mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
add HAVE_GEOIP2 #ifdef branches, without implementing yet
This commit is contained in:
@@ -329,7 +329,7 @@ dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, bool pos)
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
/* Duplicate GeoIP data */
|
||||
if (source->elements[i].type == dns_aclelementtype_geoip) {
|
||||
dest->elements[nelem + i].geoip_elem =
|
||||
@@ -407,7 +407,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
|
||||
inner = env->localnets;
|
||||
break;
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
case dns_aclelementtype_geoip:
|
||||
if (env == NULL || env->geoip == NULL)
|
||||
return (false);
|
||||
@@ -583,7 +583,7 @@ dns_acl_isinsecure(const dns_acl_t *a) {
|
||||
return (true);
|
||||
continue;
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
case dns_aclelementtype_geoip:
|
||||
#endif
|
||||
case dns_aclelementtype_localnets:
|
||||
@@ -636,7 +636,7 @@ dns_aclenv_init(isc_mem_t *mctx, dns_aclenv_t *env) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_localhost;
|
||||
env->match_mapped = false;
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
env->geoip = NULL;
|
||||
#endif
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -654,7 +654,7 @@ dns_aclenv_copy(dns_aclenv_t *t, dns_aclenv_t *s) {
|
||||
dns_acl_detach(&t->localnets);
|
||||
dns_acl_attach(s->localnets, &t->localnets);
|
||||
t->match_mapped = s->match_mapped;
|
||||
#ifdef HAVE_GEOIP
|
||||
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
|
||||
t->geoip = s->geoip;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user