]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1800. [bug] Changes #1719 allowed a INSIST to be triggered.
authorMark Andrews <marka@isc.org>
Wed, 19 Jan 2005 23:38:14 +0000 (23:38 +0000)
committerMark Andrews <marka@isc.org>
Wed, 19 Jan 2005 23:38:14 +0000 (23:38 +0000)
                        [RT #13428]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index f9838db26070a18c6e196d4c61304f050ccc39d8..0311a37fff5c13e019129f90e26209ae757eb0af 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1800.  [bug]           Changes #1719 allowed a INSIST to be triggered.
+                       [RT #13428]
 
        --- 9.3.1beta1 released ---
 
index 24a4a9dc0e200fa47a52a2fceb9e06149e86feb6..1929ed873c6c73817c7c3aa00cd0b2039c392d24 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.218.2.18.4.48 2004/12/03 02:09:33 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.18.4.49 2005/01/19 23:38:14 marka Exp $ */
 
 #include <config.h>
 
@@ -4253,11 +4253,11 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
                        /*
                         * A negative response has a SOA record (Type 2) 
                         * and a optional NS RRset (Type 1) or it has neither
-                        * a SOA or a NS RRset (Type 3) or rcode is NXDOMAIN
-                        * (handled above) in which case the NS RRset is
-                        * allowed (Type 4).
+                        * a SOA or a NS RRset (Type 3, handled above) or
+                        * rcode is NXDOMAIN (handled above) in which case
+                        * the NS RRset is allowed (Type 4).
                         */
-                       if (soa_name != NULL || ns_name == NULL)
+                       if (soa_name != NULL)
                                negative_response = ISC_TRUE;
                        for (rdataset = ISC_LIST_HEAD(name->list);
                             rdataset != NULL;
@@ -5320,6 +5320,11 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        if ((fctx->res->options & DNS_RESOLVER_CHECKNAMES) != 0)
                checknames(message);
 
+       /*
+        * Clear cache bits.
+        */
+       fctx->attributes &= ~(FCTX_ATTR_WANTNCACHE | FCTX_ATTR_WANTCACHE);
+
        /*
         * Did we get any answers?
         */