From: Evan Hunt Date: Wed, 16 Aug 2023 01:07:01 +0000 (-0700) Subject: remove cfg_acl_fromconfig2() X-Git-Tag: v9.19.17~19^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6909897adf901d16c8878b421e25cff933eee146;p=thirdparty%2Fbind9.git remove cfg_acl_fromconfig2() the extra option to limit ACL configuration to only one address family was no longer in use, and has been removed. --- diff --git a/bin/named/server.c b/bin/named/server.c index 6575d3cbcf8..9536617488d 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -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); diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index 77154b14df7..6db68b82713 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -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]; diff --git a/lib/isccfg/include/isccfg/aclconf.h b/lib/isccfg/include/isccfg/aclconf.h index eb1b9ab707a..3d70f922e7d 100644 --- a/lib/isccfg/include/isccfg/aclconf.h +++ b/lib/isccfg/include/isccfg/aclconf.h @@ -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: