Browse Source

Merge remote-tracking branch 'asn/bug13064'

Nick Mathewson 9 years ago
parent
commit
8e39395199
2 changed files with 11 additions and 5 deletions
  1. 3 0
      changes/bug13064
  2. 8 5
      src/or/dirserv.c

+ 3 - 0
changes/bug13064

@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Fix TestingDirAuthVoteGuard to properly give out Guard flags in
+      a testing network. Fixes bug 13064; bugfix on 0.2.5.2-alpha.

+ 8 - 5
src/or/dirserv.c

@@ -2142,11 +2142,6 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
   } else {
     rs->is_possible_guard = 0;
   }
-  if (options->TestingTorNetwork &&
-      routerset_contains_routerstatus(options->TestingDirAuthVoteGuard,
-                                      rs, 0)) {
-    rs->is_possible_guard = 1;
-  }
 
   rs->is_bad_exit = listbadexits && node->is_bad_exit;
   node->is_hs_dir = dirserv_thinks_router_is_hs_dir(ri, node, now);
@@ -2170,6 +2165,14 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
     tor_addr_copy(&rs->ipv6_addr, &ri->ipv6_addr);
     rs->ipv6_orport = ri->ipv6_orport;
   }
+
+  /* Iff we are in a testing network, use TestingDirAuthVoteGuard to
+     give out Guard flags. */
+  if (options->TestingTorNetwork &&
+      routerset_contains_routerstatus(options->TestingDirAuthVoteGuard,
+                                      rs, 0)) {
+    rs->is_possible_guard = 1;
+  }
 }
 
 /** Routerstatus <b>rs</b> is part of a group of routers that are on