]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2790. [bug] Handle DS queries to stub zones.
authorMark Andrews <marka@isc.org>
Thu, 26 Nov 2009 03:45:43 +0000 (03:45 +0000)
committerMark Andrews <marka@isc.org>
Thu, 26 Nov 2009 03:45:43 +0000 (03:45 +0000)
CHANGES
lib/dns/rbtdb.c

diff --git a/CHANGES b/CHANGES
index 8db96beadb8eb48868d3ea73ea6916fb54e37790..d116aee39034ca2854b473e5a8e8fc36cb46ad5e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2790.  [bug]           Handle DS queries to stub zones.
+
 2772.  [security]      When validating, track whether pending data was from
                        the additional section or not and only return it if
                        validates as secure. [RT #20438]
index 0db0ec27d5ec6ec2ec3fbec08fc25d4c64d2b315..11187323aa271e5b31f979acf4f5c06fc2d41de8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbtdb.c,v 1.196.18.57 2009/11/25 04:50:24 marka Exp $ */
+/* $Id: rbtdb.c,v 1.196.18.58 2009/11/26 03:45:43 marka Exp $ */
 
 /*! \file */
 
@@ -2608,12 +2608,18 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        } else {
                /*
                 * The node may be a zone cut itself.  If it might be one,
-                * make sure we check for it later.
+                * make sure we check for it later. 
+                *
+                * DS records live above the zone cut in ordinary zone so
+                * we want to ignore any referral.
+                *
+                * Stub zones don't have anything "above" the delgation so
+                * we always return a referral.
                 */
                if (node->find_callback &&
-                   (node != search.rbtdb->origin_node ||
-                    IS_STUB(search.rbtdb)) &&
-                   !dns_rdatatype_atparent(type))
+                   ((node != search.rbtdb->origin_node &&
+                     !dns_rdatatype_atparent(type)) ||
+                    IS_STUB(search.rbtdb)))
                        maybe_zonecut = ISC_TRUE;
        }