]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2197. [bug] Add INSIST to catch negative responses which are
authorMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 02:46:22 +0000 (02:46 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 02:46:22 +0000 (02:46 +0000)
                        not setting the event result code appropriately.
                        [RT #16909]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 0e2611bbe7b851e99eaae7ef5bbc86d08efe9bca..16615e5de6aa0c29d1bd5cfe06382f08ae5ce771 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
+2197.  [bug]           Add INSIST to catch negative responses which are
+                       not setting the event result code appropriately.
+                       [RT #16909]
+
 2196.  [port]          win32: yield processor while waiting for once to
-                       to complete. [RT16958]
+                       to complete. [RT #16958]
 
 2194.  [bug]           Close journal before calling 'done' in xfrin.c.
 
index 4ab0beb9b63ee0e260d5599ee2942ce1c9c52f72..c00dc159808b784375e31ea630baa3449bb5d435 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.218.2.49 2007/03/06 01:00:54 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.50 2007/06/18 02:46:22 marka Exp $ */
 
 #include <config.h>
 
@@ -628,6 +628,15 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) {
                       dns_rdataset_isassociated(event->rdataset) ||
                       fctx->type == dns_rdatatype_any ||
                       fctx->type == dns_rdatatype_sig);
+               
+               /*
+                * Negative results must be indicated in event->result.
+                */
+               if (dns_rdataset_isassociated(event->rdataset) &&
+                   event->rdataset->type == dns_rdatatype_none) {
+                       INSIST(event->result == DNS_R_NCACHENXDOMAIN ||
+                              event->result == DNS_R_NCACHENXRRSET);
+               }
 
                isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
        }