isc-dhcp: don't require subnet pools 21410/head
authorPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 20 Jun 2023 01:29:17 +0000 (19:29 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 20 Jun 2023 01:31:45 +0000 (19:31 -0600)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init

index 981063dae5ef8a73fdad8490982980a86cac4734..d35609e388fbde90ef01696d860b23de4557b691 100644 (file)
@@ -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
index 8aa30cd27dd77b777befca5890cec6f8f9f0a02c..fd036c6ea403823a4022ac61ae430709c865f222 100755 (executable)
@@ -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