isc-dhcp: use modzone not addzone so in-addr.arpa works

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 <philipp@redfish-solutions.com>
This commit is contained in:
Philip Prindeville
2025-12-01 16:09:26 -07:00
parent 404d74febc
commit 27f55cdbda
2 changed files with 5 additions and 5 deletions

View 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

View File

@@ -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 {