]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.2.6' into maint-0.2.7
authorNick Mathewson <nickm@torproject.org>
Tue, 8 Dec 2015 15:23:41 +0000 (10:23 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Dec 2015 15:23:41 +0000 (10:23 -0500)
1  2 
src/or/routerlist.c

index 03729bda5ce9b35a4112dcfe8da4ae532502f49e,af8e68e880a4026839318933085bb5b00f3d98fa..79a5bb39107f75c994f9530f8ca68eca312b314d
@@@ -1501,8 -1498,17 +1501,14 @@@ router_pick_directory_server_impl(dirin
      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. */
 -    if ((type & MICRODESC_DIRINFO) && !is_trusted &&
 -        !node->rs->version_supports_microdesc_cache)
 -      continue;
+     /* 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)) {