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()`.
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