mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
2599. [bug] Address rapid memory growth when validation fails.
[RT #19654]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
2599. [bug] Address rapid memory growth when validation fails.
|
||||||
|
[RT #19654]
|
||||||
|
|
||||||
2598. [func] Reserve the -F flag. [RT #19657]
|
2598. [func] Reserve the -F flag. [RT #19657]
|
||||||
|
|
||||||
2597. [bug] Handle a validation failure with a insecure delegation
|
2597. [bug] Handle a validation failure with a insecure delegation
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: resolver.c,v 1.395 2009/05/07 09:41:22 fdupont Exp $ */
|
/* $Id: resolver.c,v 1.396 2009/05/11 02:22:03 marka Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -4224,53 +4224,53 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
|
|||||||
rdataset->trust = dns_trust_pending;
|
rdataset->trust = dns_trust_pending;
|
||||||
if (sigrdataset != NULL)
|
if (sigrdataset != NULL)
|
||||||
sigrdataset->trust = dns_trust_pending;
|
sigrdataset->trust = dns_trust_pending;
|
||||||
if (!need_validation)
|
if (!need_validation || !ANSWER(rdataset)) {
|
||||||
addedrdataset = ardataset;
|
addedrdataset = ardataset;
|
||||||
else
|
result = dns_db_addrdataset(fctx->cache, node,
|
||||||
addedrdataset = NULL;
|
NULL, now, rdataset,
|
||||||
result = dns_db_addrdataset(fctx->cache, node, NULL,
|
0, addedrdataset);
|
||||||
now, rdataset, 0,
|
if (result == DNS_R_UNCHANGED) {
|
||||||
addedrdataset);
|
|
||||||
if (result == DNS_R_UNCHANGED) {
|
|
||||||
result = ISC_R_SUCCESS;
|
|
||||||
if (!need_validation &&
|
|
||||||
ardataset != NULL &&
|
|
||||||
ardataset->type == 0) {
|
|
||||||
/*
|
|
||||||
* The answer in the cache is better
|
|
||||||
* than the answer we found, and is
|
|
||||||
* a negative cache entry, so we
|
|
||||||
* must set eresult appropriately.
|
|
||||||
*/
|
|
||||||
if (NXDOMAIN(ardataset))
|
|
||||||
eresult = DNS_R_NCACHENXDOMAIN;
|
|
||||||
else
|
|
||||||
eresult = DNS_R_NCACHENXRRSET;
|
|
||||||
/*
|
|
||||||
* We have a negative response from
|
|
||||||
* the cache so don't attempt to
|
|
||||||
* add the RRSIG rrset.
|
|
||||||
*/
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
break;
|
|
||||||
if (sigrdataset != NULL) {
|
|
||||||
if (!need_validation)
|
|
||||||
addedrdataset = asigrdataset;
|
|
||||||
else
|
|
||||||
addedrdataset = NULL;
|
|
||||||
result = dns_db_addrdataset(fctx->cache,
|
|
||||||
node, NULL, now,
|
|
||||||
sigrdataset, 0,
|
|
||||||
addedrdataset);
|
|
||||||
if (result == DNS_R_UNCHANGED)
|
|
||||||
result = ISC_R_SUCCESS;
|
result = ISC_R_SUCCESS;
|
||||||
|
if (!need_validation &&
|
||||||
|
ardataset != NULL &&
|
||||||
|
ardataset->type == 0) {
|
||||||
|
/*
|
||||||
|
* The answer in the cache isi
|
||||||
|
* better than the answer we
|
||||||
|
* found, and is a negative
|
||||||
|
* cache entry, so we must set
|
||||||
|
* eresult appropriately.
|
||||||
|
*/
|
||||||
|
if (NXDOMAIN(ardataset))
|
||||||
|
eresult =
|
||||||
|
DNS_R_NCACHENXDOMAIN;
|
||||||
|
else
|
||||||
|
eresult =
|
||||||
|
DNS_R_NCACHENXRRSET;
|
||||||
|
/*
|
||||||
|
* We have a negative response
|
||||||
|
* from the cache so don't
|
||||||
|
* attempt to add the RRSIG
|
||||||
|
* rrset.
|
||||||
|
*/
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
break;
|
break;
|
||||||
} else if (!ANSWER(rdataset))
|
if (sigrdataset != NULL) {
|
||||||
continue;
|
addedrdataset = asigrdataset;
|
||||||
|
result = dns_db_addrdataset(fctx->cache,
|
||||||
|
node, NULL, now,
|
||||||
|
sigrdataset, 0,
|
||||||
|
addedrdataset);
|
||||||
|
if (result == DNS_R_UNCHANGED)
|
||||||
|
result = ISC_R_SUCCESS;
|
||||||
|
if (result != ISC_R_SUCCESS)
|
||||||
|
break;
|
||||||
|
} else if (!ANSWER(rdataset))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ANSWER(rdataset) && need_validation) {
|
if (ANSWER(rdataset) && need_validation) {
|
||||||
if (fctx->type != dns_rdatatype_any &&
|
if (fctx->type != dns_rdatatype_any &&
|
||||||
|
Reference in New Issue
Block a user