]> 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:43:46 +0000 (02:43 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 02:43:46 +0000 (02:43 +0000)
                        not setting the event result code appropriately.
                        [RT #16909]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index ba23654b7197f19ed7e1655f7a3dd9510b44ce8f..ba7d5752fc54f4e0b7ddb5ab9716356c4695737f 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]
 
        --- 9.4.2b1 released ---
 
index 9a119cf238de990c61b548cc99cb0728e890fcee..1d582077d133f63478d9aab831b07638bfae90be 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.284.18.59 2007/03/06 00:50:11 marka Exp $ */
+/* $Id: resolver.c,v 1.284.18.60 2007/06/18 02:43:46 marka Exp $ */
 
 /*! \file */
 
@@ -795,6 +795,15 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) {
                       fctx->type == dns_rdatatype_any ||
                       fctx->type == dns_rdatatype_rrsig ||
                       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));
                count++;