From: Ondřej Surý Date: Tue, 17 Jan 2023 06:21:34 +0000 (+0100) Subject: Commit the change of view for view->managed_keys X-Git-Tag: v9.19.10~39^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e8b53720d73cc52bd19fc8245fb7d2ebfe21dc9;p=thirdparty%2Fbind9.git Commit the change of view for view->managed_keys When we change the view in the view->managed_keys, we never commit the change, keeping the previous view possibly attached forever. Call the dns_zone_setviewcommit() immediately after changing the view as we are detaching the previous view anyway and there's no way to recover from that. --- diff --git a/bin/named/server.c b/bin/named/server.c index 3be36685ae5..ef67cb81a4e 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -6900,6 +6900,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) { dns_zone_attach(pview->managed_keys, &view->managed_keys); dns_zone_setview(pview->managed_keys, view); + dns_zone_setviewcommit(pview->managed_keys); dns_view_detach(&pview); dns_zone_synckeyzone(view->managed_keys); return (ISC_R_SUCCESS);