summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-04 21:44:31 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-04 21:44:31 -0500
commit626a8b60d7752f38e6587bed9b614c6d039dd9f7 (patch)
tree227f93749508620dc346d2828ade36f47e123517 /src/or/policies.c
parente5ca5040a56b74f3d0de82d74946f0d9c7d44cc3 (diff)
parentffddd4de2a69a896be3886b8f48a218a70babbcc (diff)
downloadtor-626a8b60d7752f38e6587bed9b614c6d039dd9f7.tar.gz
tor-626a8b60d7752f38e6587bed9b614c6d039dd9f7.zip
Merge remote-tracking branch 'linus/bug5053-bug5055'
Conflicts: src/or/geoip.c
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 8485a7b139..09ba10bbe7 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_ip(addr);
+ /* XXXXipv6 */
+ 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);
}