diff options
author | Linus Nordberg <linus@torproject.org> | 2012-10-20 18:48:58 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-10-20 20:56:59 +0200 |
commit | 817ff962f830188ec4c1a907ebc389a856ea3288 (patch) | |
tree | 50954b5f4315db3b66d3ccb991fd818f0ee78935 /src/or/router.c | |
parent | e2313d8622aebc2704ce016dfef2be975fa535c3 (diff) | |
download | tor-817ff962f830188ec4c1a907ebc389a856ea3288.tar.gz tor-817ff962f830188ec4c1a907ebc389a856ea3288.zip |
Separate IPv4 and IPv6 geoip file loading.
Also add IPv6 geoip file digest to extra info.
Also also, add support for IPv6 addresses in control command
"ip-to-country".
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index 2e80c54680..926bf26c18 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2313,9 +2313,12 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, tor_free(bandwidth_usage); smartlist_add(chunks, pre); - if (geoip_is_loaded()) { - smartlist_add_asprintf(chunks, "geoip-db-digest %s\n", geoip_db_digest()); - } + if (geoip_is_loaded(AF_INET)) + smartlist_add_asprintf(chunks, "geoip-db-digest %s\n", + geoip_db_digest(AF_INET)); + if (geoip_is_loaded(AF_INET6)) + smartlist_add_asprintf(chunks, "geoip6-db-digest %s\n", + geoip_db_digest(AF_INET6)); if (options->ExtraInfoStatistics && write_stats_to_extrainfo) { log_info(LD_GENERAL, "Adding stats to extra-info descriptor."); |