]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove PDS_FOR_GUARD
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2017 20:42:28 +0000 (15:42 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2017 20:42:28 +0000 (15:42 -0500)
src/or/or.h
src/or/routerlist.c

index 81fcf61a15fad51997b9755dbcbc2f7545f194dc..80ce704e85ab16248bd82fd0ca4438ccfe1ff6d8 100644 (file)
@@ -5328,10 +5328,6 @@ typedef struct dir_server_t {
  */
 #define PDS_NO_EXISTING_MICRODESC_FETCH (1<<4)
 
-/** This node is to be chosen as a directory guard, so don't choose any
- * node that's currently a guard. */
-#define PDS_FOR_GUARD (1<<5)
-
 /** Possible ways to weight routers when choosing one randomly.  See
  * routerlist_sl_choose_by_bandwidth() for more information.*/
 typedef enum bandwidth_weight_rule_t {
index 03f8bc7744755fddbea58702792e0771de09f5f8..47352710692393eeae783fcd3df7b72af15a6d88 100644 (file)
@@ -1996,10 +1996,8 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags,
   const int fascistfirewall = ! (flags & PDS_IGNORE_FASCISTFIREWALL);
   const int no_serverdesc_fetching =(flags & PDS_NO_EXISTING_SERVERDESC_FETCH);
   const int no_microdesc_fetching = (flags & PDS_NO_EXISTING_MICRODESC_FETCH);
-  const int for_guard = (flags & PDS_FOR_GUARD);
   int try_excluding = 1, n_excluded = 0, n_busy = 0;
   int try_ip_pref = 1;
-  tor_assert_nonfatal(! for_guard); // XXXX prop271
 
   if (!consensus)
     return NULL;
@@ -2033,10 +2031,6 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags,
 
     SKIP_MISSING_TRUSTED_EXTRAINFO(type, node->identity);
 
-    /* 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)) {