From: Evan Hunt Date: Wed, 29 Oct 2025 19:45:31 +0000 (-0700) Subject: set cfgmaps correctly X-Git-Tag: v9.21.15~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf2df7316a827c23f1835a68f00289443d5378f;p=thirdparty%2Fbind9.git set cfgmaps correctly a typo in MR !11165 caused cfgmaps to be set with only the top-level configuration, not the view configuration. --- diff --git a/bin/named/server.c b/bin/named/server.c index 03ec0874eb8..49e7143bdd3 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -3759,8 +3759,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, cfg_aclconfctx_t *aclctx, isc_tlsctx_cache_t *tlsctx_client_cache, bool need_hints, bool first_time) { - const cfg_obj_t *maps[4]; - const cfg_obj_t *cfgmaps[3]; + const cfg_obj_t *maps[4] = { 0 }; + const cfg_obj_t *cfgmaps[3] = { 0 }; const cfg_obj_t *options = NULL; const cfg_obj_t *voptions = NULL; const cfg_obj_t *forwardtype = NULL; @@ -3794,7 +3794,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, bool rpz_configured = false; bool catz_configured = false; bool shared_cache = false; - int i = 0, j = 0, k = 0; + int i = 0, j = 0; const char *str = NULL; const char *cachename = NULL; dns_order_t *order = NULL; @@ -3832,18 +3832,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, if (vconfig != NULL) { voptions = cfg_tuple_get(vconfig, "options"); maps[i++] = voptions; - cfgmaps[k++] = voptions; + cfgmaps[j++] = voptions; } if (options != NULL) { maps[i++] = options; } maps[i++] = named_g_defaultoptions; - maps[i] = NULL; if (config != NULL) { cfgmaps[j++] = config; } - cfgmaps[j] = NULL; /* * Set the view's port number for outgoing queries.