diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-18 14:50:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-18 14:50:01 -0400 |
commit | 26639b7798b5f5dae93e40bd7d050cb218a8aad2 (patch) | |
tree | 4e267e2dee87d5e3ffe6c1f4c94dd882961269e3 /src/or/routerlist.c | |
parent | 173efa10515e23b45e37f96a3755a2f16411a71a (diff) | |
parent | 44095312fa63c2623418346eb0cb487b45cf9c50 (diff) | |
download | tor-26639b7798b5f5dae93e40bd7d050cb218a8aad2.tar.gz tor-26639b7798b5f5dae93e40bd7d050cb218a8aad2.zip |
Merge remote-tracking branch 'public/no_dup_guards' into maint-0.2.4
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 7f4e88cf03..0c978e9d00 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1150,6 +1150,7 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags) int requireother = ! (flags & PDS_ALLOW_SELF); int fascistfirewall = ! (flags & PDS_IGNORE_FASCISTFIREWALL); int prefer_tunnel = (flags & PDS_PREFER_TUNNELED_DIR_CONNS_); + int for_guard = (flags & PDS_FOR_GUARD); int try_excluding = 1, n_excluded = 0; if (!consensus) @@ -1189,6 +1190,8 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags) if ((type & MICRODESC_DIRINFO) && !is_trusted && !node->rs->version_supports_microdesc_cache) continue; + if (for_guard && node->using_as_guard) + continue; /* Don't make the same node a guard twice. */ if (try_excluding && routerset_contains_routerstatus(options->ExcludeNodes, status, country)) { |