2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

add HAVE_GEOIP2 #ifdef branches, without implementing yet

This commit is contained in:
Evan Hunt
2019-06-11 18:36:52 -07:00
parent fea6b5bf10
commit fe46d5bc34
14 changed files with 195 additions and 137 deletions

View File

@@ -64,11 +64,11 @@ dns_acl_isinsecure_test(void **state) {
dns_acl_t *none = NULL;
dns_acl_t *notnone = NULL;
dns_acl_t *notany = NULL;
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
dns_acl_t *geoip = NULL;
dns_acl_t *notgeoip = NULL;
dns_aclelement_t *de;
#endif
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
UNUSED(state);
@@ -90,7 +90,7 @@ dns_acl_isinsecure_test(void **state) {
result = dns_acl_merge(notany, any, false);
assert_int_equal(result, ISC_R_SUCCESS);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
result = dns_acl_create(dt_mctx, 1, &geoip);
assert_int_equal(result, ISC_R_SUCCESS);
@@ -111,26 +111,26 @@ dns_acl_isinsecure_test(void **state) {
result = dns_acl_merge(notgeoip, geoip, false);
assert_int_equal(result, ISC_R_SUCCESS);
#endif
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
assert_true(dns_acl_isinsecure(any)); /* any; */
assert_false(dns_acl_isinsecure(none)); /* none; */
assert_false(dns_acl_isinsecure(notany)); /* !any; */
assert_false(dns_acl_isinsecure(notnone)); /* !none; */
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
assert_true(dns_acl_isinsecure(geoip)); /* geoip; */
assert_false(dns_acl_isinsecure(notgeoip)); /* !geoip; */
#endif
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
dns_acl_detach(&any);
dns_acl_detach(&none);
dns_acl_detach(&notany);
dns_acl_detach(&notnone);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
dns_acl_detach(&geoip);
dns_acl_detach(&notgeoip);
#endif
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
}
int