mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-27 03:51:16 -05:00
cache loading
This commit is contained in:
parent
925c6e6f4d
commit
73ca2fa486
2 changed files with 19 additions and 2 deletions
|
|
@ -82,6 +82,11 @@ EXTERN const char * ns_g_conffile INIT("/etc/named.conf");
|
|||
*/
|
||||
EXTERN isc_boolean_t ns_g_coreok INIT(ISC_TRUE);
|
||||
|
||||
/*
|
||||
* XXX Temporary.
|
||||
*/
|
||||
EXTERN const char * ns_g_cachefile INIT(NULL);
|
||||
|
||||
#undef EXTERN
|
||||
#undef INIT
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,19 @@ create_default_view(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
dns_view_setcachedb(view, db);
|
||||
dns_db_detach(&db);
|
||||
|
||||
/*
|
||||
* XXXRTH Temporary support for loading cache contents.
|
||||
*/
|
||||
if (ns_g_cachefile != NULL) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_DEBUG(1), "loading cache '%s'",
|
||||
ns_g_cachefile);
|
||||
result = dns_db_load(view->cachedb, ns_g_cachefile);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Resolver.
|
||||
*
|
||||
|
|
@ -308,9 +321,8 @@ load_configuration(const char *filename) {
|
|||
ISC_LIST_APPEND(lctx.viewlist, view, link);
|
||||
|
||||
/*
|
||||
* Load zones. (???)
|
||||
* Load zones.
|
||||
*/
|
||||
|
||||
for (view = ISC_LIST_HEAD(lctx.viewlist);
|
||||
view != NULL;
|
||||
view = view_next) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue