isc-dhcp: use modzone not addzone so in-addr.arpa works
authorPhilip Prindeville <[email protected]>
Mon, 1 Dec 2025 23:09:26 +0000 (16:09 -0700)
committerPhilip Prindeville <[email protected]>
Tue, 2 Dec 2025 17:03:24 +0000 (10:03 -0700)
Updates to in-addr.arpa are being rejected with:

update failed: REFUSED

because we create an empty zone, and then try to add it again
when it already exists.  So use modzone instead to update it.

Signed-off-by: Philip Prindeville <[email protected]>
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init

index 6ee6b90009a864905ebcdde958451b7ccd8f5a18..c9eddf3a3ef98d4456ebf8e86ff81471e2d8ed98 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:=12
+PKG_RELEASE:=13
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index b6e454cc5467644e6c7c42c1e0b72470d0564112..d7f24d9be02605bbb9a1172fd7f7b244f2f14859 100755 (executable)
@@ -137,11 +137,11 @@ write_empty_zone() {
        local zpath
        zpath="$1"
 
-       cat > "$zpath" <<\EOF
+       cat > "$zpath" <<EOF
 ;
-; BIND empty zone created by isc-dhcp-server
+; BIND empty zone created by isc-dhcp-server at $(date)
 ;
-$TTL   604800
+\$TTL  604800
 @      IN      SOA     localhost. root.localhost. (
                              1         ; Serial
                         604800         ; Refresh
@@ -167,7 +167,7 @@ create_empty_zone() {
        chown bind:bind "$zpath" || return 1
        chmod 0664 "$zpath" || return 1
 
-       if ! error=$(rndc addzone $zone "{
+       if ! error=$(rndc modzone $zone "{
                type primary;
                file \"$zpath\";
                update-policy {