2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

don't INSIST() that calling dns_db_find() on the root hints

only binds the rdataset when returning ISC_R_SUCCESS, because that's not the case -
for example, if the root hints are '. 300 IN CNAME .', DNS_R_CNAME is returned and
the rdataset is bound
This commit is contained in:
Andreas Gustafsson 2001-08-27 17:20:10 +00:00
parent 89555ff443
commit 135c1c53b8
2 changed files with 15 additions and 7 deletions

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.197 2001/08/27 06:10:15 marka Exp $ */
/* $Id: query.c,v 1.198 2001/08/27 17:20:09 gson Exp $ */
#include <config.h>
@ -2608,10 +2608,17 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
rdataset, sigrdataset);
}
if (result != ISC_R_SUCCESS) {
INSIST(node == NULL);
INSIST(!dns_rdataset_isassociated(rdataset));
INSIST(sigrdataset == NULL ||
!dns_rdataset_isassociated(sigrdataset));
/*
* Nonsensical root hints may require cleanup.
*/
if (dns_rdataset_isassociated(rdataset))
dns_rdataset_disassociate(rdataset);
if (sigrdataset != NULL &&
dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
if (node != NULL)
dns_db_detachnode(db, &node);
/*
* We don't have any root server hints, but
* we may have working forwarders, so try to

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: view.c,v 1.102 2001/08/27 06:10:17 marka Exp $ */
/* $Id: view.c,v 1.103 2001/08/27 17:20:10 gson Exp $ */
#include <config.h>
@ -998,8 +998,9 @@ dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
* We can't even find the hints for the root
* nameservers!
*/
if (dns_rdataset_isassociated(rdataset))
dns_rdataset_disassociate(rdataset);
result = ISC_R_NOTFOUND;
INSIST(!dns_rdataset_isassociated(rdataset));
}
}