From: Matthijs Mekking Date: Tue, 31 Mar 2026 12:47:43 +0000 (+0200) Subject: Remove modified zone configuration from NZD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daa9e5744884a6fbbfe78f2087229b6c6855ba3c;p=thirdparty%2Fbind9.git Remove modified zone configuration from NZD When a zone that is configured in named.conf is modified with 'rndc modzone', the new zone configuration is now also stored in the NZD. This must be removed when the zone is deleted with 'rndc delzone', otherwise a restart will fail. --- diff --git a/bin/named/server.c b/bin/named/server.c index 0ad94b76ac9..a8af9ff1616 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -12615,7 +12615,7 @@ rmzone(void *arg) { char zonename[DNS_NAME_FORMATSIZE]; dns_view_t *view = NULL; dns_db_t *dbp = NULL; - bool added; + bool added, modded; isc_result_t result; MDB_txn *txn = NULL; MDB_dbi dbi; @@ -12636,11 +12636,12 @@ rmzone(void *arg) { * (If this is a catalog zone member then nzf_config can be NULL) */ added = dns_zone_getadded(zone); + modded = dns_zone_getmodded(zone); catz = dns_zone_get_parentcatz(zone); LOCK(&view->newzone.lock); - if (added && catz == NULL) { + if ((added || modded) && catz == NULL) { /* Make sure we can open the NZD database */ result = nzd_open(view, 0, &txn, &dbi); if (result != ISC_R_SUCCESS) {