dns_cache_getname(nsc->cache));
nsc = NULL;
} else {
+ shared_cache = true;
+ dns_cache_attach(nsc->cache, &cache);
if (oldcache) {
- ISC_LIST_UNLINK(*oldcachelist, nsc, link);
- ISC_LIST_APPEND(*cachelist, nsc, link);
- nsc->primaryview = view;
+ /*
+ * We need to re-use the cache, but we don't
+ * want to mutate the old production list.
+ */
+ nsc = NULL;
}
- dns_cache_attach(nsc->cache, &cache);
- shared_cache = true;
}
} else if (strcmp(cachename, view->name) == 0) {
result = dns_viewlist_find(&named_g_server->viewlist, cachename,