]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2057. [bug] Make setting "ra" dependent on both allow-query-cache
authorMark Andrews <marka@isc.org>
Sat, 22 Jul 2006 01:02:36 +0000 (01:02 +0000)
committerMark Andrews <marka@isc.org>
Sat, 22 Jul 2006 01:02:36 +0000 (01:02 +0000)
                        and allow-recursion. [RT #16290]

CHANGES
bin/named/client.c

diff --git a/CHANGES b/CHANGES
index ef4630ca053211d792bc54174661beb9439189d0..a17f458a4606df4a5c1c9743bf840cb299e6e68a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2057.  [bug]           Make setting "ra" dependent on both allow-query-cache
+                       and allow-recursion. [RT #16290]
+
 2056.  [bug]           dig: ixfr= was not being treated case insensitively
                        at all times. [RT #15955]
 
index accac82272264385c3adcd8c10e94b642d88d3a2..d69e44b869be12d00d456f1fa0b2ee27aefe11e3 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: client.c,v 1.219.18.19 2006/07/21 23:40:30 marka Exp $ */
+/* $Id: client.c,v 1.219.18.20 2006/07/22 01:02:36 marka Exp $ */
 
 #include <config.h>
 
@@ -1700,12 +1700,15 @@ client_request(isc_task_t *task, isc_event_t *event) {
         * Decide whether recursive service is available to this client.
         * We do this here rather than in the query code so that we can
         * set the RA bit correctly on all kinds of responses, not just
-        * responses to ordinary queries.
+        * responses to ordinary queries.  Note if you can't query the
+        * cache there is no point in setting RA.
         */
        ra = ISC_FALSE;
        if (client->view->resolver != NULL &&
            client->view->recursion == ISC_TRUE &&
            ns_client_checkaclsilent(client, client->view->recursionacl,
+                                    ISC_TRUE) == ISC_R_SUCCESS &&
+           ns_client_checkaclsilent(client, client->view->queryacl,
                                     ISC_TRUE) == ISC_R_SUCCESS)
                ra = ISC_TRUE;