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:
parent
fa64b3a614
commit
cb543e5b93
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue