Compare commits

..

2 Commits

Author SHA1 Message Date
Mark Andrews
6b45cf2a97 9.2.6-P1 2006-08-17 07:24:37 +00:00
cvs2git
2c298fede3 This commit was manufactured by cvs2git to create branch 'v9_2_6_patch'. 2005-12-14 00:40:28 +00:00
3 changed files with 24 additions and 17 deletions

View File

@@ -1,4 +1,9 @@
--- 9.2.6-P1 released ---
1941. [bug] ncache_adderesult() should set eresult even if no
rdataset is passed to it. [RT #15642]
--- 9.2.6 released ---
--- 9.2.6rc1 released ---

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.218.2.42 2005/07/04 23:19:17 marka Exp $ */
/* $Id: resolver.c,v 1.218.2.42.2.1 2006/08/17 07:24:37 marka Exp $ */
#include <config.h>
@@ -3214,23 +3214,28 @@ ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
isc_result_t *eresultp)
{
isc_result_t result;
dns_rdataset_t rdataset;
if (ardataset == NULL) {
dns_rdataset_init(&rdataset);
ardataset = &rdataset;
}
result = dns_ncache_add(message, cache, node, covers, now,
maxttl, ardataset);
if (result == DNS_R_UNCHANGED) {
if (result == DNS_R_UNCHANGED || result == ISC_R_SUCCESS) {
/*
* The data in the cache is better than the negative cache
* entry we're trying to add.
* If the cache now contains a negative entry and we
* care about whether it is DNS_R_NCACHENXDOMAIN or
* DNS_R_NCACHENXRRSET then extract it.
*/
if (ardataset != NULL && ardataset->type == 0) {
if (ardataset->type == 0) {
/*
* The cache data is also a negative cache
* entry.
* The cache data is a negative cache entry.
*/
if (NXDOMAIN(ardataset))
*eresultp = DNS_R_NCACHENXDOMAIN;
else
*eresultp = DNS_R_NCACHENXRRSET;
result = ISC_R_SUCCESS;
} else {
/*
* Either we don't care about the nature of the
@@ -3242,14 +3247,11 @@ ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
* XXXRTH There's a CNAME/DNAME problem here.
*/
*eresultp = ISC_R_SUCCESS;
result = ISC_R_SUCCESS;
}
} else if (result == ISC_R_SUCCESS) {
if (NXDOMAIN(ardataset))
*eresultp = DNS_R_NCACHENXDOMAIN;
else
*eresultp = DNS_R_NCACHENXRRSET;
result = ISC_R_SUCCESS;
}
if (ardataset == &rdataset && dns_rdataset_isassociated(ardataset))
dns_rdataset_disassociate(ardataset);
return (result);
}

View File

@@ -1,4 +1,4 @@
# $Id: version,v 1.26.2.42 2005/12/14 00:40:26 marka Exp $
# $Id: version,v 1.26.2.42.2.1 2006/08/17 07:24:37 marka Exp $
#
# This file must follow /bin/sh rules. It is imported directly via
# configure.
@@ -6,5 +6,5 @@
MAJORVER=9
MINORVER=2
PATCHVER=6
RELEASETYPE=
RELEASEVER=
RELEASETYPE=-P
RELEASEVER=1