2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

701. [func] Root hints are now fully optional. Class IN

views use compiled-in hints by default, as
                        before.  Non-IN views with no root hints now
                        provide authoritative service but not recursion.
                        A warning is logged if a view has neither root
                        hints nor authoritative data for the root. [RT #696]
This commit is contained in:
Andreas Gustafsson
2001-01-22 19:21:19 +00:00
parent a1cfa2a82d
commit 634784cb66
3 changed files with 36 additions and 14 deletions

View File

@@ -1,3 +1,11 @@
701. [func] Root hints are now fully optional. Class IN
views use compiled-in hints by default, as
before. Non-IN views with no root hints now
provide authoritative service but not recursion.
A warning is logged if a view has neither root
hints nor authoritative data for the root. [RT #696]
700. [bug] $GENERATE range check was wrong. [RT #688]
699. [bug] The lexer mishandled empty quoted strings. [RT #694]

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.174 2001/01/11 20:48:27 gson Exp $ */
/* $Id: query.c,v 1.175 2001/01/22 19:21:19 gson Exp $ */
#include <config.h>
@@ -2567,13 +2567,19 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* the hints DB.
*/
INSIST(!is_zone);
INSIST(client->view->hints != NULL);
if (db != NULL)
dns_db_detach(&db);
dns_db_attach(client->view->hints, &db);
result = dns_db_find(db, dns_rootname, NULL, dns_rdatatype_ns,
0, client->now, &node, fname,
rdataset, sigrdataset);
if (client->view->hints == NULL) {
/* We have no hints. */
result = ISC_R_FAILURE;
} else {
dns_db_attach(client->view->hints, &db);
result = dns_db_find(db, dns_rootname,
NULL, dns_rdatatype_ns,
0, client->now, &node, fname,
rdataset, sigrdataset);
}
if (result != ISC_R_SUCCESS) {
/*
* We can't even find the hints for the root

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.282 2001/01/18 00:14:20 bwelling Exp $ */
/* $Id: server.c,v 1.283 2001/01/22 19:21:18 gson Exp $ */
#include <config.h>
@@ -562,15 +562,23 @@ configure_view(dns_view_t *view, dns_c_ctx_t *cctx, dns_c_view_t *cview,
/*
* If we still have no hints, this is a non-IN view with no
* "hints zone" configured. That's an error.
* "hints zone" configured. Issue a warning, except if this
* is a root server. Root servers never need to consult
* their hints, so it's no point requireing users to configure
* them.
*/
if (view->hints == NULL) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"no root hints for view '%s'",
cview == NULL ? "<default>" : cview->name);
result = ISC_R_FAILURE;
goto cleanup;
dns_zone_t *rootzone = NULL;
dns_view_findzone(view, dns_rootname, &rootzone);
if (rootzone != NULL) {
dns_zone_detach(&rootzone);
} else {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
"no root hints for view '%s'",
cview == NULL ? "<default>" :
cview->name);
}
}
/*