isc-dhcp: refuse to add empty DHCP range
ipcalc.sh no longer outputs invalid ranges and fails with an error code in such cases. React to the error. Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
This commit is contained in:
parent
3ad482078b
commit
dd2daafc6e
|
@ -445,7 +445,10 @@ dhcpd_add() {
|
|||
|
||||
dhcp_ifs="$dhcp_ifs $ifname"
|
||||
|
||||
ipcalc $subnet $start $limit
|
||||
if ! ipcalc "$subnet" "$start" "$limit"; then
|
||||
echo "invalid range params: $subnet start: $start limit $limit" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
config_get netmask "$cfg" "netmask" "$NETMASK"
|
||||
config_get leasetime "$cfg" "leasetime"
|
||||
|
|
Loading…
Reference in New Issue