]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Evaluate TestingDirAuthVoteGuard only after filling all rs elements.
authorGeorge Kadianakis <desnacked@riseup.net>
Sat, 6 Sep 2014 11:37:41 +0000 (14:37 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Sat, 6 Sep 2014 11:37:41 +0000 (14:37 +0300)
changes/bug13064 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug13064 b/changes/bug13064
new file mode 100644 (file)
index 0000000..c35b9a8
--- /dev/null
@@ -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.
index 52258e875fbfdb84418d9dcd5d0e2c83fc4775fa..17a7ad962e9a2db19ff65d3904d183208e4ff29e 100644 (file)
@@ -2320,11 +2320,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_directory = listbaddirs && node->is_bad_directory;
   rs->is_bad_exit = listbadexits && node->is_bad_exit;
@@ -2350,6 +2345,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