]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1381. [bug] named failed to correctly process answers that
authorMark Andrews <marka@isc.org>
Thu, 12 Sep 2002 04:52:13 +0000 (04:52 +0000)
committerMark Andrews <marka@isc.org>
Thu, 12 Sep 2002 04:52:13 +0000 (04:52 +0000)
                        contained DNAME records where the resulting CNAME
                        resulted in a negative answer.

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 1df883ec9525b4796d06439c9bcac644db6cba0b..9b227f7cd5abfb14ab99588c1afd5f2eb1096684 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1381.  [bug]           named failed to correctly process answers that
+                       contained DNAME records where the resulting CNAME
+                       resulted in a negative answer.
+
 1380.  [func]          'rndc recursing' dump recursing queries to
                        'recursing-file = "named.recursing";'.
 
index b2fd1f9d73f031e517e5068bf9043f1f23342f22..d545c7ae0865edd2a6de14eb2697b5e92662f1cc 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.252 2002/09/12 04:42:46 marka Exp $ */
+/* $Id: resolver.c,v 1.253 2002/09/12 04:52:13 marka Exp $ */
 
 #include <config.h>
 
@@ -4001,8 +4001,8 @@ answer_response(fetchctx_t *fctx) {
                        for (rdataset = ISC_LIST_HEAD(name->list);
                             rdataset != NULL;
                             rdataset = ISC_LIST_NEXT(rdataset, link)) {
+                               isc_boolean_t found_dname = ISC_FALSE;
                                found = ISC_FALSE;
-                               want_chaining = ISC_FALSE;
                                aflag = 0;
                                if (rdataset->type == dns_rdatatype_dname) {
                                        /*
@@ -4029,6 +4029,8 @@ answer_response(fetchctx_t *fctx) {
                                                want_chaining = ISC_FALSE;
                                        } else if (result != ISC_R_SUCCESS)
                                                return (result);
+                                       else
+                                               found_dname = ISC_TRUE;
                                } else if (rdataset->type == dns_rdatatype_sig
                                           && rdataset->covers ==
                                           dns_rdatatype_dname) {
@@ -4074,7 +4076,7 @@ answer_response(fetchctx_t *fctx) {
                                        /*
                                         * DNAME chaining.
                                         */
-                                       if (want_chaining) {
+                                       if (found_dname) {
                                                /*
                                                 * Copy the the dname into the
                                                 * qname fixed name.