2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

when reloading the server, zone objects reused with a new

view object still referenced their old view
This commit is contained in:
Andreas Gustafsson
2000-05-23 04:38:22 +00:00
parent 862d18c79a
commit 875ad7d99d
2 changed files with 15 additions and 8 deletions

View File

@@ -922,16 +922,21 @@ configure_zone(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview,
dns_zone_detach(&zone);
}
/*
* If we cannot reuse an existing zone, we will have to
* create a new one.
*/
if (zone == NULL) {
if (zone != NULL) {
/*
* We found a reusable zone. Make it use the
* new view.
*/
dns_zone_setview(zone, view);
} else {
/*
* We cannot reuse an existing zone, we have
* to create a new one.
*/
CHECK(dns_zone_create(&zone, lctx->mctx));
CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setview(zone, view);
CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr,
zone));
CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr, zone));
}
/*