diff options
Diffstat (limited to 'src/feature/control')
-rw-r--r-- | src/feature/control/getinfo_geoip.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/feature/control/getinfo_geoip.c b/src/feature/control/getinfo_geoip.c index be89c2c641..e2d277f256 100644 --- a/src/feature/control/getinfo_geoip.c +++ b/src/feature/control/getinfo_geoip.c @@ -44,10 +44,7 @@ getinfo_helper_geoip(control_connection_t *control_conn, *errmsg = "GeoIP data not loaded"; return -1; } - if (family == AF_INET) - c = geoip_get_country_by_ipv4(tor_addr_to_ipv4h(&addr)); - else /* AF_INET6 */ - c = geoip_get_country_by_ipv6(tor_addr_to_in6(&addr)); + c = geoip_get_country_by_addr(&addr); *answer = tor_strdup(geoip_get_country_name(c)); } return 0; |