This commit is contained in:
parent
2f168eae0b
commit
07c8bd2ff7
21
external/bsd/bind/dist/bin/named/query.c
vendored
21
external/bsd/bind/dist/bin/named/query.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: query.c,v 1.6 2011/09/11 18:55:27 christos Exp $ */
|
||||
/* $NetBSD: query.c,v 1.7 2011/11/16 17:28:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
@ -1395,11 +1395,9 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
goto addname;
|
||||
if (result == DNS_R_NCACHENXRRSET) {
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
/*
|
||||
* Negative cache entries don't have sigrdatasets.
|
||||
*/
|
||||
INSIST(sigrdataset == NULL ||
|
||||
! dns_rdataset_isassociated(sigrdataset));
|
||||
if (sigrdataset != NULL &&
|
||||
dns_rdataset_isassociated(sigrdataset))
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
mname = NULL;
|
||||
@ -1440,8 +1438,9 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
goto addname;
|
||||
if (result == DNS_R_NCACHENXRRSET) {
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
INSIST(sigrdataset == NULL ||
|
||||
! dns_rdataset_isassociated(sigrdataset));
|
||||
if (sigrdataset != NULL &&
|
||||
dns_rdataset_isassociated(sigrdataset))
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
mname = NULL;
|
||||
@ -1891,10 +1890,8 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
goto setcache;
|
||||
if (result == DNS_R_NCACHENXRRSET) {
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
/*
|
||||
* Negative cache entries don't have sigrdatasets.
|
||||
*/
|
||||
INSIST(! dns_rdataset_isassociated(sigrdataset));
|
||||
if (dns_rdataset_isassociated(sigrdataset))
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
/* Remember the result as a cache */
|
||||
|
6
external/bsd/bind/dist/lib/dns/rbtdb.c
vendored
6
external/bsd/bind/dist/lib/dns/rbtdb.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rbtdb.c,v 1.10 2011/09/11 18:55:36 christos Exp $ */
|
||||
/* $NetBSD: rbtdb.c,v 1.11 2011/11/16 17:28:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
@ -5055,7 +5055,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
||||
rdataset);
|
||||
if (need_headerupdate(found, search.now))
|
||||
update = found;
|
||||
if (foundsig != NULL) {
|
||||
if (!NEGATIVE(found) && foundsig != NULL) {
|
||||
bind_rdataset(search.rbtdb, node, foundsig, search.now,
|
||||
sigrdataset);
|
||||
if (need_headerupdate(foundsig, search.now))
|
||||
@ -5687,7 +5687,7 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
}
|
||||
if (found != NULL) {
|
||||
bind_rdataset(rbtdb, rbtnode, found, now, rdataset);
|
||||
if (foundsig != NULL)
|
||||
if (!NEGATIVE(found) && foundsig != NULL)
|
||||
bind_rdataset(rbtdb, rbtnode, foundsig, now,
|
||||
sigrdataset);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user