Handle not having a dynamic pool correctly without ipcalc.sh
generating noise about it.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.3-P1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
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