]> 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:00:04 +0000 (01:00 +0000)
committerMark Andrews <marka@isc.org>
Sat, 22 Jul 2006 01:00:04 +0000 (01:00 +0000)
                        and allow-recursion. [RT #16290]

CHANGES
bin/named/client.c

diff --git a/CHANGES b/CHANGES
index 102d517c0847137e6806cc036284a644ed9d7c58..0e3f3d8a66dc97b5eda7e49800f0de0b0203f675 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 25551c4b56be9adebf62943016c2d6dfb8533364..20f8b79d67173c334b0d514a329a550207c2f7dc 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: client.c,v 1.238 2006/07/21 23:38:16 marka Exp $ */
+/* $Id: client.c,v 1.239 2006/07/22 01:00:04 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;