Pull request 2070: 4923 gopacket DHCP vol.4
Merge in DNS/adguard-home from 4923-gopacket-dhcp-vol.4 to master
Updates #4923.
Squashed commit of the following:
commit 4b87258c70ac98b2abb1ac95f7e916e244b3cd08
Merge: 61458864f 9b91a8740
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Thu Nov 16 14:05:34 2023 +0300
Merge branch 'master' into 4923-gopacket-dhcp-vol.4
commit 61458864f3df7a027e65060a5f0fb516cc7911a7
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Nov 15 18:48:40 2023 +0300
all: imp code
commit 506a0ab81e76beebb900f86580577563b471e4e2
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 14 15:59:56 2023 +0300
all: cleanup moving lease
commit 8d218b732662ac4308ed09d28c1bf9f65906d47c
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Mon Nov 13 18:13:39 2023 +0300
all: rm old leases type
This commit is contained in:
@@ -43,7 +43,7 @@ func (conf *Config) Validate() (err error) {
|
||||
case !conf.Enabled:
|
||||
return nil
|
||||
case conf.ICMPTimeout < 0:
|
||||
return fmt.Errorf("icmp timeout %s must be non-negative", conf.ICMPTimeout)
|
||||
return newMustErr("icmp timeout", "be non-negative", conf.ICMPTimeout)
|
||||
}
|
||||
|
||||
err = netutil.ValidateDomainName(conf.LocalDomainName)
|
||||
@@ -68,9 +68,9 @@ func (conf *Config) Validate() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// mustBeErr returns an error that indicates that valName must be as must
|
||||
// newMustErr returns an error that indicates that valName must be as must
|
||||
// describes.
|
||||
func mustBeErr(valName, must string, val fmt.Stringer) (err error) {
|
||||
func newMustErr(valName, must string, val fmt.Stringer) (err error) {
|
||||
return fmt.Errorf("%s %s must %s", valName, val, must)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user