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.
This commit is contained in:
Evan Hunt
2023-08-15 18:07:01 -07:00
parent ac2b9280f2
commit 6909897adf
3 changed files with 4 additions and 36 deletions

View 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];

View 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: