2593. [bug] Improve a corner source of SERVFAILs [RT #19632]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -241,6 +241,8 @@
|
||||
2601. [doc] Mention file creation mode mask in the
|
||||
named manual page.
|
||||
|
||||
2593. [bug] Improve a corner source of SERVFAILs [RT #19632]
|
||||
|
||||
2589. [bug] dns_db_unregister() failed to clear '*dbimp'.
|
||||
[RT #19626]
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.c,v 1.313.20.14 2009/11/25 02:25:56 marka Exp $ */
|
||||
/* $Id: query.c,v 1.313.20.15 2009/12/03 04:38:28 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -3318,6 +3318,14 @@ do { \
|
||||
line = __LINE__; \
|
||||
} 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
|
||||
* record.
|
||||
@@ -4042,14 +4050,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
client->query.attributes |=
|
||||
NS_QUERYATTR_RECURSING;
|
||||
else if (result == DNS_R_DUPLICATE ||
|
||||
result == DNS_R_DROP) {
|
||||
/* Duplicate query. */
|
||||
QUERY_ERROR(result);
|
||||
} else {
|
||||
/* Unable to recurse. */
|
||||
QUERY_ERROR(DNS_R_SERVFAIL);
|
||||
}
|
||||
else
|
||||
RECURSE_ERROR(result);
|
||||
goto cleanup;
|
||||
} else {
|
||||
/* Unable to give root server referral. */
|
||||
@@ -4228,11 +4230,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
client->query.attributes |=
|
||||
NS_QUERYATTR_RECURSING;
|
||||
else if (result == DNS_R_DUPLICATE ||
|
||||
result == DNS_R_DROP)
|
||||
QUERY_ERROR(result);
|
||||
else
|
||||
QUERY_ERROR(DNS_R_SERVFAIL);
|
||||
RECURSE_ERROR(result);
|
||||
} else {
|
||||
dns_fixedname_t fixed;
|
||||
|
||||
@@ -4772,7 +4771,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
client->query.attributes |=
|
||||
NS_QUERYATTR_RECURSING;
|
||||
else
|
||||
QUERY_ERROR(DNS_R_SERVFAIL); }
|
||||
RECURSE_ERROR(result);
|
||||
}
|
||||
goto addauth;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user