mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 20:00:00 -04:00
Create a default view for class IN if there are no views defined after
loading the configuration file.
This commit is contained in:
parent
5305b2140b
commit
904b918f77
1 changed files with 11 additions and 1 deletions
|
|
@ -310,8 +310,18 @@ load_configuration(const char *filename) {
|
|||
}
|
||||
|
||||
/*
|
||||
* XXXRTH Create default view, if required.
|
||||
* If we haven't created any views, create a default view for class
|
||||
* IN. (We're a caching-only server.)
|
||||
*/
|
||||
if (ISC_LIST_EMPTY(lctx.viewlist)) {
|
||||
view = NULL;
|
||||
result = create_default_view(ns_g_mctx, dns_rdataclass_in,
|
||||
&view);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_server_fatal(NS_LOGMODULE_SERVER, ISC_FALSE,
|
||||
"could not create default view");
|
||||
ISC_LIST_APPEND(lctx.viewlist, view, link);
|
||||
}
|
||||
|
||||
/*
|
||||
* Freeze the views.
|
||||
|
|
|
|||
Loading…
Reference in a new issue