mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 16:59:59 -04:00
Call dns_catz_new_zones() only when it is needed
The configure_catz() function creates the catalog zones structure for the view even when it is not needed, in which case it then discards it (by detaching) later. Instead, call dns_catz_new_zones() only when it is needed, i.e. when there is no existing "previous" view with an existing 'catzs', that is going to be reused.
This commit is contained in:
parent
53f0c5a9ac
commit
2a52d30660
1 changed files with 3 additions and 4 deletions
|
|
@ -3163,9 +3163,6 @@ configure_catz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t *config,
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
dns_catz_new_zones(view->mctx, named_g_loopmgr, &view->catzs,
|
||||
&ns_catz_zonemodmethods);
|
||||
|
||||
if (pview != NULL) {
|
||||
old = pview->catzs;
|
||||
} else {
|
||||
|
|
@ -3178,10 +3175,12 @@ configure_catz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t *config,
|
|||
}
|
||||
|
||||
if (old != NULL) {
|
||||
dns_catz_detach_catzs(&view->catzs);
|
||||
dns_catz_attach_catzs(pview->catzs, &view->catzs);
|
||||
dns_catz_detach_catzs(&pview->catzs);
|
||||
dns_catz_prereconfig(view->catzs);
|
||||
} else {
|
||||
dns_catz_new_zones(view->mctx, named_g_loopmgr, &view->catzs,
|
||||
&ns_catz_zonemodmethods);
|
||||
}
|
||||
|
||||
while (zone_element != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue