[master] clean up a redundancy
authorEvan Hunt <each@isc.org>
Mon, 23 Oct 2017 18:11:19 +0000 (11:11 -0700)
committerEvan Hunt <each@isc.org>
Mon, 23 Oct 2017 18:11:19 +0000 (11:11 -0700)
4777. [cleanup] Removed a redundant call to configure_view_acl().
[RT #46369]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index 72cb7f4..dac0ca6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4777.  [cleanup]       Removed a redundant call to configure_view_acl().
+                       [RT #46369]
+
 4776.  [bug]           Improve portability of ht_test. [RT #46333]
 
 4775.  [bug]           Address Coverity warnings in ht_test.c and mem_test.c
index 2101c1d..969c6e4 100644 (file)
@@ -4681,20 +4681,19 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
         * "allow-recursion" inherits from "allow-query-cache" if set,
         * otherwise from "allow-query" if set.
         */
-       if (view->cacheacl == NULL && view->recursionacl != NULL)
+       if (view->cacheacl == NULL && view->recursionacl != NULL) {
                dns_acl_attach(view->recursionacl, &view->cacheacl);
-       /*
-        * XXXEACH: This call to configure_view_acl() is redundant.  We
-        * are leaving it as it is because we are making a minimal change
-        * for a patch release.  In the future this should be changed to
-        * dns_acl_attach(view->queryacl, &view->cacheacl).
-        */
-       if (view->cacheacl == NULL && view->recursion)
-               CHECK(configure_view_acl(vconfig, config, "allow-query", NULL,
-                                        actx, named_g_mctx, &view->cacheacl));
+       }
+
+       if (view->cacheacl == NULL && view->recursion) {
+               dns_acl_attach(view->queryacl, &view->cacheacl);
+       }
+
        if (view->recursion &&
            view->recursionacl == NULL && view->cacheacl != NULL)
+       {
                dns_acl_attach(view->cacheacl, &view->recursionacl);
+       }
 
        /*
         * Set default "allow-recursion", "allow-recursion-on" and