From: Colin Vidal Date: Tue, 9 Jun 2026 13:38:50 +0000 (+0200) Subject: remove GeoIP2 `metro` and `metrocode` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66453715667108d7a7952b7f43a7ebc64d264a15;p=thirdparty%2Fbind9.git remove GeoIP2 `metro` and `metrocode` The `geoip metro` and `geoip metrocode` configuration options has been removed as metro code are deprecated from MaxMind library. --- diff --git a/bin/tests/system/geoip2/conf/good-options.conf b/bin/tests/system/geoip2/conf/good-options.conf index 4e39fba9a23..d29871884f9 100644 --- a/bin/tests/system/geoip2/conf/good-options.conf +++ b/bin/tests/system/geoip2/conf/good-options.conf @@ -13,8 +13,6 @@ options { recursion no; geoip-directory "data"; allow-query { - geoip metro 828; - geoip metrocode 828; geoip tz "America/Los_Angeles"; geoip timezone "America/Los_Angeles"; geoip postal 95060; diff --git a/lib/dns/geoip2.c b/lib/dns/geoip2.c index c47edeea99b..effbb7fdbbf 100644 --- a/lib/dns/geoip2.c +++ b/lib/dns/geoip2.c @@ -166,7 +166,6 @@ geoip2_database(const dns_geoip_databases_t *geoip, case dns_geoip_city_name: case dns_geoip_city_postalcode: case dns_geoip_city_timezonecode: - case dns_geoip_city_metrocode: case dns_geoip_city_areacode: return geoip->city; @@ -319,14 +318,6 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, } break; - case dns_geoip_city_metrocode: - ret = MMDB_get_value(&state->entry, &value, "location", - "metro_code", (char *)0); - if (ret == MMDB_SUCCESS) { - return match_string(&value, elt->as_string); - } - break; - case dns_geoip_isp_name: ret = MMDB_get_value(&state->entry, &value, "isp", (char *)0); if (ret == MMDB_SUCCESS) { diff --git a/lib/dns/include/dns/geoip.h b/lib/dns/include/dns/geoip.h index 9b461966547..d566ec4f458 100644 --- a/lib/dns/include/dns/geoip.h +++ b/lib/dns/include/dns/geoip.h @@ -65,7 +65,6 @@ typedef enum { dns_geoip_city_regionname, dns_geoip_city_name, dns_geoip_city_postalcode, - dns_geoip_city_metrocode, dns_geoip_city_areacode, dns_geoip_city_continentcode, dns_geoip_city_continent, diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index cea7a84328e..9d31fdf07d4 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -315,7 +315,6 @@ get_subtype(const cfg_obj_t *obj, dns_geoip_subtype_t subtype, */ case dns_geoip_city_name: case dns_geoip_city_postalcode: - case dns_geoip_city_metrocode: case dns_geoip_city_areacode: case dns_geoip_city_timezonecode: if (strcasecmp(dbname, "city") != 0) { @@ -396,7 +395,6 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) { case dns_geoip_city_regionname: case dns_geoip_city_name: case dns_geoip_city_postalcode: - case dns_geoip_city_metrocode: case dns_geoip_city_areacode: case dns_geoip_city_continentcode: case dns_geoip_city_continent: @@ -528,11 +526,6 @@ parse_geoip_element(const cfg_obj_t *obj, cfg_aclconfctx_t *ctx, "geoiop postal code (%s) too long", search); return ISC_R_FAILURE; } - } else if (strcasecmp(stype, "metro") == 0 || - strcasecmp(stype, "metrocode") == 0) - { - subtype = dns_geoip_city_metrocode; - de.geoip_elem.as_int = atoi(search); } else if (strcasecmp(stype, "tz") == 0 || strcasecmp(stype, "timezone") == 0) {