aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-08 10:20:14 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-08 10:20:14 -0500
commitc3d11b119dbd46fa02a1e26d76ddc74424dd4b18 (patch)
tree2b2b60ffbfd4e3a9613dc030ba77e9cb22104ce0 /src/or
parent432852577000ab5eb07ae3ca961a36e5f6e796ba (diff)
parent35deb4d442da38d7dcfb235665da50f3a4f7c293 (diff)
downloadtor-c3d11b119dbd46fa02a1e26d76ddc74424dd4b18.tar.gz
tor-c3d11b119dbd46fa02a1e26d76ddc74424dd4b18.zip
Merge branch 'maint-0.2.4' into maint-0.2.5
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 32cbe19379..07e87724ba 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1459,8 +1459,14 @@ 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. */
+ /* 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)) {