]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Also remove modded catalog zones from NZD
authorMatthijs Mekking <matthijs@isc.org>
Wed, 1 Apr 2026 15:06:19 +0000 (17:06 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 2 Apr 2026 12:35:54 +0000 (12:35 +0000)
In the rare case where a catalog zone member is being modified with
'rndc modzone', also mark the zone as modded, so when the zone is
deleted again with 'rndc delzone', the configuration is also removed
from the NZD.

bin/named/server.c

index a8af9ff161659c511e2045af92f9d512f1aa019b..778486bfe5dd9f5502c415e529db7c7b56849cee 100644 (file)
@@ -12611,7 +12611,6 @@ static void
 rmzone(void *arg) {
        ns_dzctx_t *dz = (ns_dzctx_t *)arg;
        dns_zone_t *zone = NULL, *raw = NULL, *mayberaw = NULL;
-       dns_catz_zone_t *catz = NULL;
        char zonename[DNS_NAME_FORMATSIZE];
        dns_view_t *view = NULL;
        dns_db_t *dbp = NULL;
@@ -12637,11 +12636,10 @@ rmzone(void *arg) {
         */
        added = dns_zone_getadded(zone);
        modded = dns_zone_getmodded(zone);
-       catz = dns_zone_get_parentcatz(zone);
 
        LOCK(&view->newzone.lock);
 
-       if ((added || modded) && catz == NULL) {
+       if (added || modded) {
                /* Make sure we can open the NZD database */
                result = nzd_open(view, 0, &txn, &dbi);
                if (result != ISC_R_SUCCESS) {