2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 16:15:27 +00:00

Improve a corner source of SERVFAILs [RT #19632]

This commit is contained in:
Francis Dupont
2009-04-30 11:45:10 +00:00
parent 3836f447ee
commit cc620f9fdb
2 changed files with 16 additions and 14 deletions

View File

@@ -1,3 +1,5 @@
2593. [bug] Improve a corner source of SERVFAILs [RT #19632]
2592. [bug] Treat "any" as a type in nsupdate. [RT #19455] 2592. [bug] Treat "any" as a type in nsupdate. [RT #19455]
2591. [bug] named could die when processing a update in 2591. [bug] named could die when processing a update in

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: query.c,v 1.322 2009/03/13 01:35:18 marka Exp $ */ /* $Id: query.c,v 1.323 2009/04/30 11:45:10 fdupont Exp $ */
/*! \file */ /*! \file */
@@ -3321,6 +3321,14 @@ do { \
line = __LINE__; \ line = __LINE__; \
} while (0) } while (0)
#define RECURSE_ERROR(r) \
do { \
if ((r) == DNS_R_DUPLICATE || (r) == DNS_R_DROP) \
QUERY_ERROR(r); \
else \
QUERY_ERROR(DNS_R_SERVFAIL); \
} while (0)
/* /*
* Extract a network address from the RDATA of an A or AAAA * Extract a network address from the RDATA of an A or AAAA
* record. * record.
@@ -4003,14 +4011,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
client->query.attributes |= client->query.attributes |=
NS_QUERYATTR_RECURSING; NS_QUERYATTR_RECURSING;
else if (result == DNS_R_DUPLICATE || else
result == DNS_R_DROP) { RECURSE_ERROR(result);
/* Duplicate query. */
QUERY_ERROR(result);
} else {
/* Unable to recurse. */
QUERY_ERROR(DNS_R_SERVFAIL);
}
goto cleanup; goto cleanup;
} else { } else {
/* Unable to give root server referral. */ /* Unable to give root server referral. */
@@ -4189,11 +4191,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
client->query.attributes |= client->query.attributes |=
NS_QUERYATTR_RECURSING; NS_QUERYATTR_RECURSING;
else if (result == DNS_R_DUPLICATE ||
result == DNS_R_DROP)
QUERY_ERROR(result);
else else
QUERY_ERROR(DNS_R_SERVFAIL); RECURSE_ERROR(result);
} else { } else {
dns_fixedname_t fixed; dns_fixedname_t fixed;
@@ -4733,7 +4732,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
client->query.attributes |= client->query.attributes |=
NS_QUERYATTR_RECURSING; NS_QUERYATTR_RECURSING;
else else
QUERY_ERROR(DNS_R_SERVFAIL); } RECURSE_ERROR(result);
}
goto addauth; goto addauth;
} }
/* /*