aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-08 10:23:41 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-08 10:23:41 -0500
commitc6a337557ae5c73e8dc8208b18f902e9eeb21404 (patch)
treea225a5e361fab5e6d1c5cefb2623ade9ba1f9c56 /src/or
parenteeb9751eadd148e5077cedb28f75e756b47281c0 (diff)
parent1adc2bf66fedb1768c5013dcf5f4778fae453217 (diff)
downloadtor-c6a337557ae5c73e8dc8208b18f902e9eeb21404.tar.gz
tor-c6a337557ae5c73e8dc8208b18f902e9eeb21404.zip
Merge branch 'maint-0.2.6' into maint-0.2.7
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerlist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 03729bda5c..79a5bb3910 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)) {