Also remove modded catalog zones from NZD

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.
This commit is contained in:
Matthijs Mekking 2026-04-01 17:06:19 +02:00
parent daa9e57448
commit ccb01b15e5

View 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) {