]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2110. [bug] "minimal-response yes;" interacted badly with BIND 8
authorMark Andrews <marka@isc.org>
Thu, 7 Dec 2006 04:38:07 +0000 (04:38 +0000)
committerMark Andrews <marka@isc.org>
Thu, 7 Dec 2006 04:38:07 +0000 (04:38 +0000)
                        priming queries. [RT #16491]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index cc4d62f1f41985914897d8e476fc5ad4578623a2..75d4dac8fb3a0a70e008269c211d9763a009df57 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2110.  [bug]           "minimal-response yes;" interacted badly with BIND 8
+                       priming queries. [RT #16491]
 
 2109.  [port]          libbind: silence aix 5.3 compiler warnings. [RT #16502]
 
index 3927d8a5e7b74866a10fc0fa1a1f3f9eacf231bb..774109d7de6d3851ba79dae93dbd09a640c5c916 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.198.2.27 2006/05/18 03:19:09 marka Exp $ */
+/* $Id: query.c,v 1.198.2.28 2006/12/07 04:38:07 marka Exp $ */
 
 #include <config.h>
 
@@ -671,7 +671,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, unsigned int options,
                                                      ISC_LOG_DEBUG(3),
                                                      "%s approved", msg);
                                }
-                       } else {
+                       } else {
                                ns_client_aclmsg("query", name,
                                                 client->view->rdclass,
                                                 msg, sizeof(msg));
@@ -1387,7 +1387,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                 * we could raise the priority of glue records.
                 */
                eresult = query_addadditional(client, name, dns_rdatatype_key);
-       } else if (type == dns_rdatatype_srv && trdataset != NULL) {
+       } else if (type == dns_rdatatype_srv && trdataset != NULL) {
                /*
                 * If we're adding SRV records to the additional data
                 * section, it's helpful if we add the SRV additional data
@@ -3224,6 +3224,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        sigrdatasetp = &sigrdataset;
                else
                        sigrdatasetp = NULL;
+               /*  
+                * BIND 8 priming queries need the additional section.
+                */
+               if (is_zone && qtype == dns_rdatatype_ns &&
+                   dns_name_equal(client->query.qname, dns_rootname))
+                       client->query.attributes &= ~NS_QUERYATTR_NOADDITIONAL;
+
                query_addrrset(client, &fname, &rdataset, sigrdatasetp, dbuf,
                               DNS_SECTION_ANSWER);
                /*
@@ -3770,7 +3777,7 @@ synth_finish(ns_client_t *client, isc_result_t result) {
 static signed char ascii2hex[256] = {
        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1,        -1, -1, -1, -1, -1, -1, -1, -1,
+       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
         0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1,
        -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,