]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix delegdb flush API
authorColin Vidal <colin@isc.org>
Tue, 26 May 2026 16:13:44 +0000 (18:13 +0200)
committerColin Vidal <colin@isc.org>
Thu, 28 May 2026 11:59:38 +0000 (13:59 +0200)
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()`.

bin/named/server.c

index 52faae029cd83f867bfc7c7a58848a5c6a8b61c8..c58a01467e721d1ca00fb8af3cbbdc58f8379ec0 100644 (file)
@@ -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