From 66ecb6789b7effa68f75dc70f0843a26825b44f6 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 26 Nov 2009 03:28:19 +0000 Subject: [PATCH] 2790. [bug] Handle DS queries to stub zones. --- CHANGES | 2 ++ lib/dns/rbtdb.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 363b22820a..5b5e92bd9c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2790. [bug] Handle DS queries to stub zones. + 2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] 2788. [bug] dnssec-signzone could sign with keys that were diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 6397fb3704..4cfbd4d7f2 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.290 2009/11/25 02:22:05 marka Exp $ */ +/* $Id: rbtdb.c,v 1.291 2009/11/26 03:28:19 marka Exp $ */ /*! \file */ @@ -3643,12 +3643,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; }