]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove cfg_acl_fromconfig2()
authorEvan Hunt <each@isc.org>
Wed, 16 Aug 2023 01:07:01 +0000 (18:07 -0700)
committerEvan Hunt <each@isc.org>
Thu, 31 Aug 2023 17:29:16 +0000 (10:29 -0700)
the extra option to limit ACL configuration to only one address family
was no longer in use, and has been removed.

bin/named/server.c
lib/isccfg/aclconf.c
lib/isccfg/include/isccfg/aclconf.h

index 6575d3cbcf8303c736764dbc9a221b3d8b7fa6ce..9536617488d553ac6cedb91d40295318daed068c 100644 (file)
@@ -11098,9 +11098,9 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
                                          &tls_params, tlsctx_cache, &delt));
        }
 
-       result = cfg_acl_fromconfig2(cfg_tuple_get(listener, "acl"), config,
-                                    named_g_lctx, actx, mctx, 0, family,
-                                    &delt->acl);
+       result = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
+                                   named_g_lctx, actx, mctx, family,
+                                   &delt->acl);
        if (result != ISC_R_SUCCESS) {
                ns_listenelt_destroy(delt);
                return (result);
index 77154b14df7d57eea2f0d59a4bbd41e5b1f5a9d2..6db68b8271391879e7ec9fad2784a0393913e173 100644 (file)
@@ -620,18 +620,9 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
 #endif /* HAVE_GEOIP2 */
 
 isc_result_t
-cfg_acl_fromconfig(const cfg_obj_t *caml, const cfg_obj_t *cctx,
+cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                   isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
                   unsigned int nest_level, dns_acl_t **target) {
-       return (cfg_acl_fromconfig2(caml, cctx, lctx, ctx, mctx, nest_level, 0,
-                                   target));
-}
-
-isc_result_t
-cfg_acl_fromconfig2(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
-                   isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
-                   unsigned int nest_level, uint16_t family,
-                   dns_acl_t **target) {
        isc_result_t result;
        dns_acl_t *dacl = NULL, *inneracl = NULL;
        dns_aclelement_t *de;
@@ -795,18 +786,6 @@ cfg_acl_fromconfig2(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                        unsigned int bitlen;
 
                        cfg_obj_asnetprefix(ce, &addr, &bitlen);
-                       if (family != 0 && family != addr.family) {
-                               char buf[ISC_NETADDR_FORMATSIZE + 1];
-                               isc_netaddr_format(&addr, buf, sizeof(buf));
-                               cfg_obj_log(ce, lctx, ISC_LOG_WARNING,
-                                           "'%s': incorrect address family; "
-                                           "ignoring",
-                                           buf);
-                               if (nest_level != 0) {
-                                       dns_acl_detach(&de->nestedacl);
-                               }
-                               continue;
-                       }
                        result = isc_netaddr_prefixok(&addr, bitlen);
                        if (result != ISC_R_SUCCESS) {
                                char buf[ISC_NETADDR_FORMATSIZE + 1];
index eb1b9ab707a31a983ffa095b66ae65f8f8bebe4b..3d70f922e7de035a038a85e5b589c9207f8a5068 100644 (file)
@@ -60,12 +60,6 @@ isc_result_t
 cfg_acl_fromconfig(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                   isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
                   unsigned int nest_level, dns_acl_t **target);
-
-isc_result_t
-cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
-                   isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
-                   unsigned int nest_level, uint16_t family,
-                   dns_acl_t **target);
 /*
  * Construct a new dns_acl_t from configuration data in 'caml' and
  * 'cctx'.  Memory is allocated through 'mctx'.
@@ -76,11 +70,6 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
  * nested dns_acl_t object when the referring objects were created
  * passing the same ACL configuration context 'ctx'.
  *
- * cfg_acl_fromconfig() is a backward-compatible version of
- * cfg_acl_fromconfig2(), which allows an address family to be
- * specified.  If 'family' is not zero, then only addresses/prefixes
- * of a matching family (AF_INET or AF_INET6) may be configured.
- *
  * On success, attach '*target' to the new dns_acl_t object.
  *
  * Require: