From: Colin Vidal Date: Tue, 26 May 2026 16:13:44 +0000 (+0200) Subject: Fix delegdb flush API X-Git-Tag: v9.21.23~24^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9ba0517878801d1dbde69d7a87b0b314db9b10;p=thirdparty%2Fbind9.git Fix delegdb flush API The `rndc flush` command flushes the delegdb by deleting the existing database and creating a new one. In the process, the delegdb was losing its configured size limit; as a result, once flushed, the delegdb size became unbounded. This is now fixed by using `dns_delegdb_getconfig()` to back up the current configuration before instantiating a new delegdb, then restoring it with `dns_delegdb_setconfig()`. --- diff --git a/bin/named/server.c b/bin/named/server.c index 52faae029cd..c58a01467e7 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -11263,9 +11263,12 @@ cleanup: static void flush_delegdb(dns_view_t *view) { + dns_delegdb_config_t config = dns_delegdb_getconfig(view->deleg); + dns_delegdb_shutdown(view->deleg); dns_delegdb_detach(&view->deleg); dns_delegdb_create(&view->deleg); + dns_delegdb_setconfig(view->deleg, &config); } isc_result_t