|
@@ -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>"),
|
|
@@ -1567,6 +1568,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 ||
|