From: Matthijs Mekking Date: Tue, 17 Mar 2026 08:29:10 +0000 (+0100) Subject: Store zone config also on modzone X-Git-Tag: v9.20.22~23^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85453d3;p=thirdparty%2Fbind9.git Store zone config also on modzone 'rndc modzone' deletes the old configuration. If we don't store the new zone config, when we do a 'rndc showzone' it will be a failure. This is not an issue in the 9.21 version, because of the effective config behavior. --- diff --git a/bin/named/server.c b/bin/named/server.c index 09cf436627a..37d4ba92e80 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -14298,6 +14298,18 @@ do_modzone(named_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view, TCHECK(putstr(text, zname)); TCHECK(putstr(text, "' reconfigured.")); } else { +#ifdef HAVE_LMDB + CHECK(nzd_open(view, 0, &txn, &dbi)); + CHECK(nzd_save(&txn, dbi, zone, zoneobj)); +#else /* ifdef HAVE_LMDB */ + result = nzf_append(view, zoneobj); + if (result != ISC_R_SUCCESS) { + TCHECK(putstr(text, "\nNew zone config not saved: ")); + TCHECK(putstr(text, isc_result_totext(result))); + goto cleanup; + } +#endif /* HAVE_LMDB */ + TCHECK(putstr(text, "zone '")); TCHECK(putstr(text, zname)); TCHECK(putstr(text, "' must also be reconfigured in\n"));