summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-16 15:15:06 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-16 15:15:06 +0000
commitb13496b62adfb3ff7f44b3e9dc5d367d08309c79 (patch)
tree90e2f0a448d39508ea61b7bc1deef0cfd07c5c1b /src/or/routerlist.c
parent2d147509d6d1d3641f371728fc79d12ca24d2284 (diff)
downloadtor-b13496b62adfb3ff7f44b3e9dc5d367d08309c79.tar.gz
tor-b13496b62adfb3ff7f44b3e9dc5d367d08309c79.zip
Possible fix for broken country settings in ExcludeExitNodes.
It turns out that we weren't updating the _ExcludeExitNodesUnion set's country numbers when we reloaded (or first loaded!) the IP-to-country file. Spotted by Lark. Bugfix on 0.2.1.6-alpha. svn:r18575
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index ecbc323937..080603b7e9 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5020,6 +5020,26 @@ routerset_parse(routerset_t *target, const char *s, const char *description)
return r;
}
+/** DOCDOC */
+void
+refresh_all_country_info(void)
+{
+ or_options_t *options = get_options();
+
+ if (options->EntryNodes)
+ routerset_refresh_countries(options->EntryNodes);
+ if (options->ExitNodes)
+ routerset_refresh_countries(options->ExitNodes);
+ if (options->ExcludeNodes)
+ routerset_refresh_countries(options->ExcludeNodes);
+ if (options->ExcludeExitNodes)
+ routerset_refresh_countries(options->ExcludeExitNodes);
+ if (options->_ExcludeExitNodesUnion)
+ routerset_refresh_countries(options->_ExcludeExitNodesUnion);
+
+ routerlist_refresh_countries();
+}
+
/** Add all members of the set <b>source</b> to <b>target</b>. */
void
routerset_union(routerset_t *target, const routerset_t *source)