]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix delv in resolver mode
authorColin Vidal <colin@isc.org>
Sat, 28 Mar 2026 12:59:26 +0000 (13:59 +0100)
committerColin Vidal <colin@isc.org>
Mon, 30 Mar 2026 18:41:13 +0000 (20:41 +0200)
Create an instance of the delegation database in the view created by
delv in resolver mode. As the default `named` configuration is not in
use, also specifically configure the `max-delegation-servers` setting
using the same default value than `named`.

bin/delv/delv.c

index 6e2370e060291ba08176aa80b8a9af8f3154d4d6..ebce81c5d660680cf31418ab5553f9ff3880ffc6 100644 (file)
@@ -53,6 +53,7 @@
 #include <dns/byaddr.h>
 #include <dns/cache.h>
 #include <dns/client.h>
+#include <dns/deleg.h>
 #include <dns/dispatch.h>
 #include <dns/fixedname.h>
 #include <dns/keytable.h>
 #define MAX_TOTAL    200
 #define MAX_RESTARTS 11
 
+/*
+ * Also see max-delegation-servers default setting (bin/include/defaultconfig.h0
+ */
+#define DEFAULT_MAX_DELEGATION_SERVERS 13
+
 /* Variables used internally by delv. */
 static dns_view_t *view = NULL;
 static ns_server_t *sctx = NULL;
@@ -2154,6 +2160,8 @@ run_server(void *arg) {
        dns_view_setdstport(view, destport);
        dns_view_setmaxrestarts(view, restarts);
        dns_view_setmaxqueries(view, maxtotal);
+       dns_view_setmaxdelegationservers(view, DEFAULT_MAX_DELEGATION_SERVERS);
+       dns_delegdb_create(&view->deleg);
 
        CHECK(dns_rootns_create(isc_g_mctx, dns_rdataclass_in, hintfile,
                                &roothints));