isc-dhcp: replacing automatic empty needs addzone
authorPhilip Prindeville <redacted>
Mon, 2 Feb 2026 20:17:10 +0000 (13:17 -0700)
committerPhilip Prindeville <redacted>
Tue, 3 Feb 2026 03:48:47 +0000 (20:48 -0700)
Since the RFC-1918 in-addr.arpa empty zones are automatically created,
they will exist, but we can't use modzone on them because that's not
how things work.

Signed-off-by: Philip Prindeville <redacted>
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init

index 2facf10575a6205eab2c582340eb7412d20d3721..25a5ebf32941de725b709316ba887a3645eab319 100644 (file)
@@ -11,7 +11,7 @@ PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_REALVERSION:=4.4.3-P1
 PKG_VERSION:=4.4.3_p1
-PKG_RELEASE:=14
+PKG_RELEASE:=15
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 6e1cb53f721d2ee5eeae383c01b4ab502508d66b..0370f33a1d1db9fac61543a936e0c5975e6a179a 100755 (executable)
@@ -167,14 +167,19 @@ create_empty_zone() {
        chown bind:bind "$zpath" || return 1
        chmod 0664 "$zpath" || return 1
 
-       # if the zone doesn't exist, we need to add it, otherwise we need to
-       # create it.
+       # if the zone doesn't exist, or a RFC-1918 in-addr.arpa zone, then
+       # we need to add it, otherwise we need to create it.
        if ! rndc zonestatus $zone >/dev/null 2>&1; then
                command="addzone"
        else
                command="modzone"
        fi
 
+       case "$zone" in
+               10.in-addr.arpa|1[6789].172.in-addr.arpa|2[0-9].172.in-addr.arpa|3[01].172.in-addr.arpa|168.192.in-addr.arpa)
+               command="addzone" ;;
+       esac
+
        if ! error=$(rndc $command $zone "{
                type primary;
                file \"$zpath\";
git clone https://git.99rst.org/PROJECT