mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 09:40:18 +04:00
isc-dhcpd: don't invoke ipcalc with empty start/range arguments
Handle not having a dynamic pool correctly without ipcalc.sh generating noise about it. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
@@ -465,8 +465,13 @@ dhcpd_add() {
|
||||
|
||||
append dhcp_ifs "$ifname"
|
||||
|
||||
if ! ipcalc "$subnet" "$start" "$limit"; then
|
||||
echo "invalid range params: $subnet start: $start limit $limit" >&2
|
||||
if [ -z "$start$limit" ]; then
|
||||
if ! ipcalc "$subnet"; then
|
||||
echo "invalid subnet param: $start" >&2
|
||||
return 1
|
||||
fi
|
||||
elif ! ipcalc "$subnet" "$start" "$limit"; then
|
||||
echo "invalid range params: $subnet start: $start limit: $limit" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user