Pull request: 4944-dhcp-creation

Merge in DNS/adguard-home from 4944-dhcp-creation to master

Updates #4944.
Updates #5191.

Squashed commit of the following:

commit f5bc5678bdf436e5eb7f17017dd78d8c8a127313
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Nov 25 18:07:35 2022 +0300

    all: log changes, imp log

commit 526fe711a2103ea11ab46992ee897a7d430ef773
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Nov 25 17:38:30 2022 +0300

    dhcpd: log creation err as debug
This commit is contained in:
Eugene Burkov
2022-11-25 18:21:25 +03:00
parent 53a366ed46
commit fafd7a1e82
3 changed files with 17 additions and 8 deletions

View File

@@ -137,14 +137,14 @@ func (c *V4ServerConf) Validate() (err error) {
gatewayIP, err := ensureV4(c.GatewayIP, "address")
if err != nil {
// Don't wrap an errors since it's informative enough as is and there is
// Don't wrap the error since it's informative enough as is and there is
// an annotation deferred already.
return err
}
subnetMask, err := ensureV4(c.SubnetMask, "subnet mask")
if err != nil {
// Don't wrap an errors since it's informative enough as is and there is
// Don't wrap the error since it's informative enough as is and there is
// an annotation deferred already.
return err
}
@@ -155,20 +155,21 @@ func (c *V4ServerConf) Validate() (err error) {
rangeStart, err := ensureV4(c.RangeStart, "address")
if err != nil {
// Don't wrap an errors since it's informative enough as is and there is
// Don't wrap the error since it's informative enough as is and there is
// an annotation deferred already.
return err
}
rangeEnd, err := ensureV4(c.RangeEnd, "address")
if err != nil {
// Don't wrap an errors since it's informative enough as is and there is
// Don't wrap the error since it's informative enough as is and there is
// an annotation deferred already.
return err
}
c.ipRange, err = newIPRange(rangeStart.AsSlice(), rangeEnd.AsSlice())
if err != nil {
// Don't wrap an errors since it's informative enough as is and there is
// Don't wrap the error since it's informative enough as is and there is
// an annotation deferred already.
return err
}