]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2172. [bug] query_addsoa() was being called with a non zone db.
authorMark Andrews <marka@isc.org>
Mon, 30 Apr 2007 01:02:53 +0000 (01:02 +0000)
committerMark Andrews <marka@isc.org>
Mon, 30 Apr 2007 01:02:53 +0000 (01:02 +0000)
                        [RT #16834]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index 0900af98c1d53b34477e950be9e7c3790783fc69..541b6e8bdc064bffecd9acdf2e17759850bb5eb4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2172.  [bug]           query_addsoa() was being called with a non zone db.
+                       [RT #16834]
+
 2171.  [bug]           Handle breaks in DNSSEC trust chains where the parent
                        servers are not DS aware (DS queries to the parent
                        return a referral to the child).
index 218ac06d52340627457e90109e2b782101682068..e922a426b1da9153d2de247d9af57d3caaf6d69e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.294 2007/03/29 06:36:29 marka Exp $ */
+/* $Id: query.c,v 1.295 2007/04/30 01:02:53 marka Exp $ */
 
 /*! \file */
 
@@ -4210,6 +4210,21 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                 * an error unless we were searching for
                                 * glue.  Ugh.
                                 */
+                               if (!is_zone) {
+                                       authoritative = ISC_FALSE;
+                                       dns_rdatasetiter_destroy(&rdsiter);
+                                       if (RECURSIONOK(client)) {
+                                               result = query_recurse(client,
+                                                                      qtype,
+                                                                      NULL,
+                                                                      NULL);
+                                               if (result == ISC_R_SUCCESS)
+                                                   client->query.attributes |=
+                                                       NS_QUERYATTR_RECURSING;
+                                               else
+                                                   QUERY_ERROR(DNS_R_SERVFAIL);                                        }
+                                       goto addauth;
+                               }
                                /*
                                 * We were searching for SIG records in
                                 * a nonsecure zone.  Send a "no error,