]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2383. [bug] named could double queries when they resulted in
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Tue, 17 Jun 2008 22:36:03 +0000 (22:36 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Tue, 17 Jun 2008 22:36:03 +0000 (22:36 +0000)
SERVFAIL due to overkilling EDNS0 failure detection.

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 30bed301569d3a28f826e45ab4591af78a9d0fbe..ca133d92ddc6b9eedf91a64b684d14996207a639 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2383.  [bug]           named could double queries when they resulted in
+                       SERVFAIL due to overkilling EDNS0 failure detection.
+
 2382.  [doc]           Add descriptions of DHCID, IPSECKEY, SPF and SSHFP
                        to ARM.
 
index bb7d383f650dc64bae82423a91eb6b65bfe9ae1d..419dda5148be3c8b42b390e71d5d44140eadb344 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.355.12.17 2008/05/29 05:28:54 marka Exp $ */
+/* $Id: resolver.c,v 1.355.12.18 2008/06/17 22:36:03 jinmei Exp $ */
 
 /*! \file */
 
@@ -5852,12 +5852,17 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
         */
        if (message->rcode != dns_rcode_noerror &&
            message->rcode != dns_rcode_nxdomain) {
-               if ((message->rcode == dns_rcode_formerr ||
-                    message->rcode == dns_rcode_notimp ||
-                    message->rcode == dns_rcode_servfail) &&
+               if (((message->rcode == dns_rcode_formerr ||
+                    message->rcode == dns_rcode_notimp) ||
+                   (message->rcode == dns_rcode_servfail &&
+                    dns_message_getopt(message) == NULL)) &&
                    (query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
                        /*
                         * It's very likely they don't like EDNS0.
+                        * If the response code is SERVFAIL, also check if the
+                        * response contains an OPT RR and don't cache the
+                        * failure since it can be returned for various other
+                        * reasons.
                         *
                         * XXXRTH  We should check if the question
                         *              we're asking requires EDNS0, and