diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile index 981063dae..d35609e38 100644 --- a/net/isc-dhcp/Makefile +++ b/net/isc-dhcp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=isc-dhcp UPSTREAM_NAME:=dhcp PKG_VERSION:=4.4.3-P1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 8aa30cd27..fd036c6ea 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -369,7 +369,9 @@ gen_dhcp_subnet() { local cfg="$1" echo "subnet $NETWORK netmask $NETMASK {" - echo " range $START $END;" + if [ -n "$START" ] && [ -n "$END" ]; then + echo " range $START $END;" + fi echo " option subnet-mask $netmask;" if [ "$BROADCAST" != "0.0.0.0" ] ; then echo " option broadcast-address $BROADCAST;" @@ -408,10 +410,13 @@ dhcpd_add() { [ -n "$net" ] || return 0 config_get start "$cfg" "start" - [ -n "$start" ] || return 0 - config_get limit "$cfg" "limit" - [ -n "$limit" ] || return 0 + + case "$start:$limit" in + ":*"|"*:") + echo "dhcpd: start/limit must be used together in $cfg" >&2 + return 0 + esac network_get_subnet subnet "$net" || return 0 network_get_device ifname "$net" || return 0