aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2023-06-19 19:29:17 -0600
committerPhilip Prindeville <philipp@redfish-solutions.com>2023-06-19 19:31:45 -0600
commitfc4cd3aee5b212e6c82e1ee1a33736675ccf9afa (patch)
treeeaca7997b8e4d9480ad1c2957d2b97eeef91fb87
parent019ed9f739962554ceb7bb7999abb3ba3031a3aa (diff)
isc-dhcp: don't require subnet pools
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-rw-r--r--net/isc-dhcp/Makefile2
-rwxr-xr-xnet/isc-dhcp/files/dhcpd.init13
2 files changed, 10 insertions, 5 deletions
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