diff --git a/dhcpd/dhcpd.go b/dhcpd/dhcpd.go index 9ac2b85b..b95982a1 100644 --- a/dhcpd/dhcpd.go +++ b/dhcpd/dhcpd.go @@ -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) {