]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2783. [func] Return minimal responses to EDNS/UDP queries with a UDP
authorMark Andrews <marka@isc.org>
Tue, 24 Nov 2009 03:09:57 +0000 (03:09 +0000)
committerMark Andrews <marka@isc.org>
Tue, 24 Nov 2009 03:09:57 +0000 (03:09 +0000)
                        buffer size of 512 or less.  [RT #20654]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index 7d35850cd6f677a92da11fc32543d951fba8e987..84ae73bd300ab135d2928499958c7e50ae07f7ad 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2783.  [func]          Return minimal responses to EDNS/UDP queries with a UDP
+                       buffer size of 512 or less.  [RT #20654]
+
 2782.  [port]          win32: use getaddrinfo() for hostname lookups.
                        [RT #20650]
 
index 52365433dac10de37aec7b7e2dc2840b4546c83d..b767a75e682b79d7e56c0a0fd543eb64021fc09e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.332 2009/11/17 23:55:18 marka Exp $ */
+/* $Id: query.c,v 1.333 2009/11/24 03:09:57 marka Exp $ */
 
 /*! \file */
 
@@ -5309,6 +5309,14 @@ ns_query_start(ns_client_t *client) {
                client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY |
                                             NS_QUERYATTR_NOADDITIONAL);
 
+       /*
+        * Turn on minimal responses for EDNS/UDP bufsize 512 queries.
+        */
+       if (client->opt != NULL && client->udpsize <= 512U &&
+           (client->attributes & NS_CLIENTATTR_TCP) == 0)
+               client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY |
+                                            NS_QUERYATTR_NOADDITIONAL);
+
        /*
         * If the client has requested that DNSSEC checking be disabled,
         * allow lookups to return pending data and instruct the resolver