aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authornils <nils@shkoo.com>2012-02-29 17:04:45 -0800
committerLinus Nordberg <linus@torproject.org>2012-10-17 10:54:52 +0200
commitabb886014e1ee35909e8876fe3361cbfd26cc27c (patch)
tree8409f09ea0bf8a00c7f31aacd166c39dca6042b0 /src/or/policies.c
parent167363403b54accb2442fe10a8c588532ab4c26f (diff)
downloadtor-abb886014e1ee35909e8876fe3361cbfd26cc27c.tar.gz
tor-abb886014e1ee35909e8876fe3361cbfd26cc27c.zip
Add GeoIP database for IPv6 addresses
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 4d217c9351..8187249d86 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -319,9 +319,13 @@ addr_is_in_cc_list(uint32_t addr, const smartlist_t *cc_list)
{
country_t country;
const char *name;
+ tor_addr_t tar;
+
if (!cc_list)
return 0;
- country = geoip_get_country_by_ipv4(addr);
+ /* XXX: ipv4 specific */
+ tor_addr_from_ipv4h(&tar, addr);
+ country = geoip_get_country_by_addr(&tar);
name = geoip_get_country_name(country);
return smartlist_string_isin_case(cc_list, name);
}