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:
@@ -45,15 +45,15 @@ func (conf *IPv4Config) validate() (err error) {
|
||||
case !conf.Enabled:
|
||||
return nil
|
||||
case !conf.GatewayIP.Is4():
|
||||
return mustBeErr("gateway ip", "be a valid ipv4", conf.GatewayIP)
|
||||
return newMustErr("gateway ip", "be a valid ipv4", conf.GatewayIP)
|
||||
case !conf.SubnetMask.Is4():
|
||||
return mustBeErr("subnet mask", "be a valid ipv4 cidr mask", conf.SubnetMask)
|
||||
return newMustErr("subnet mask", "be a valid ipv4 cidr mask", conf.SubnetMask)
|
||||
case !conf.RangeStart.Is4():
|
||||
return mustBeErr("range start", "be a valid ipv4", conf.RangeStart)
|
||||
return newMustErr("range start", "be a valid ipv4", conf.RangeStart)
|
||||
case !conf.RangeEnd.Is4():
|
||||
return mustBeErr("range end", "be a valid ipv4", conf.RangeEnd)
|
||||
return newMustErr("range end", "be a valid ipv4", conf.RangeEnd)
|
||||
case conf.LeaseDuration <= 0:
|
||||
return mustBeErr("lease duration", "be less than %d", conf.LeaseDuration)
|
||||
return newMustErr("lease duration", "be less than %d", conf.LeaseDuration)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user