* dhcp: validate range_start/range_end values
This commit is contained in:
parent
307b934cf1
commit
625b22a8d7
|
@ -129,6 +129,9 @@ func (s *Server) setConfig(config ServerConfig) error {
|
|||
if err != nil {
|
||||
return wrapErrPrint(err, "Failed to parse range end address %s", config.RangeEnd)
|
||||
}
|
||||
if dhcp4.IPRange(s.leaseStart, s.leaseStop) <= 0 {
|
||||
return wrapErrPrint(err, "DHCP: Incorrect range_start/range_end values")
|
||||
}
|
||||
|
||||
subnet, err := parseIPv4(config.SubnetMask)
|
||||
if err != nil || !isValidSubnetMask(subnet) {
|
||||
|
|
Loading…
Reference in New Issue