diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-01 17:24:08 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-01 17:24:08 -0500 |
commit | acb43c0735af8a7cd9e8eb57bb8835b11a90a1be (patch) | |
tree | be1f63b73dc0824fc6614baca18369230f06e31a /src/or/config.c | |
parent | c93f66b1037e151268b5662f3957d13c4c94d1fb (diff) | |
parent | ec7ffed79da3f84d4bff7b92434f872dd228102c (diff) | |
download | tor-acb43c0735af8a7cd9e8eb57bb8835b11a90a1be.tar.gz tor-acb43c0735af8a7cd9e8eb57bb8835b11a90a1be.zip |
Merge remote-tracking branch 'public/feature7706'
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 2ba9c76729..31695baa73 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -242,6 +242,7 @@ static config_var_t option_vars_[] = { V(FetchHidServDescriptors, BOOL, "1"), V(FetchUselessDescriptors, BOOL, "0"), V(FetchV2Networkstatus, BOOL, "0"), + V(GeoIPExcludeUnknown, AUTOBOOL, "auto"), #ifdef _WIN32 V(GeoIPFile, FILENAME, "<default>"), V(GeoIPv6File, FILENAME, "<default>"), @@ -1574,6 +1575,18 @@ options_act(const or_options_t *old_options) config_maybe_load_geoip_files_(options, old_options); + if (geoip_is_loaded(AF_INET) && options->GeoIPExcludeUnknown) { + /* ExcludeUnknown is true or "auto" */ + const int is_auto = options->GeoIPExcludeUnknown == -1; + int changed; + + changed = routerset_add_unknown_ccs(&options->ExcludeNodes, is_auto); + changed += routerset_add_unknown_ccs(&options->ExcludeExitNodes, is_auto); + + if (changed) + routerset_add_unknown_ccs(&options->ExcludeExitNodesUnion_, is_auto); + } + if (options->CellStatistics || options->DirReqStatistics || options->EntryStatistics || options->ExitPortStatistics || options->ConnDirectionStatistics || |