diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-08 10:23:56 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-08 10:23:56 -0500 |
commit | 252149e8b4697c570097acd514c433b8215f24dd (patch) | |
tree | 5d8a3a67ae6b16a8fbd0c8195e580f96b6658d0b /src | |
parent | b585cf3ca38a947450cafacaef4d85db6c377635 (diff) | |
parent | c6a337557ae5c73e8dc8208b18f902e9eeb21404 (diff) | |
download | tor-252149e8b4697c570097acd514c433b8215f24dd.tar.gz tor-252149e8b4697c570097acd514c433b8215f24dd.zip |
Merge branch 'maint-0.2.7'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 8f6a440d16..08911b96a7 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1501,8 +1501,14 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags, if ((type & EXTRAINFO_DIRINFO) && !router_supports_extrainfo(node->identity, is_trusted_extrainfo)) continue; - if (for_guard && node->using_as_guard) - continue; /* Don't make the same node a guard twice. */ + /* Don't make the same node a guard twice */ + if (for_guard && node->using_as_guard) { + continue; + } + /* Ensure that a directory guard is actually a guard node. */ + if (for_guard && !node->is_possible_guard) { + continue; + } if (try_excluding && routerset_contains_routerstatus(options->ExcludeNodes, status, country)) { |