]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add TestingDirAuthVoteExit option (like TestingDirAuthVoteGuard)
authorteor <teor2345@gmail.com>
Wed, 1 Oct 2014 07:44:21 +0000 (17:44 +1000)
committerteor <teor2345@gmail.com>
Wed, 1 Oct 2014 07:44:21 +0000 (17:44 +1000)
Add the TestingDirAuthVoteExit option, a list of nodes to vote Exit for,
regardless of their uptime, bandwidth, or exit policy.

TestingTorNetwork must be set for this option to have any effect.

Works around an issue where authorities would take up to 35 minutes to
give nodes the Exit flag in a test network, despite short consensus
intervals. Partially implements ticket 13161.

changes/feature13161-TestingDirAuthVoteExit [new file with mode: 0644]
doc/tor.1.txt
src/or/config.c
src/or/dirserv.c
src/or/or.h

diff --git a/changes/feature13161-TestingDirAuthVoteExit b/changes/feature13161-TestingDirAuthVoteExit
new file mode 100644 (file)
index 0000000..d6c8f41
--- /dev/null
@@ -0,0 +1,7 @@
+  o Minor features (testing):
+    - Add the TestingDirAuthVoteExit option, a list of nodes to vote
+      Exit for regardless of their uptime, bandwidth, or exit policy.
+      TestingTorNetwork must be set for this option to have any effect.
+      Works around an issue where authorities would take up to 35 minutes
+      to give nodes the Exit flag in a test network, despite short
+      consensus intervals. Partially implements ticket 13161.
index ff178196a86a6261abf55e861c77c0c78b570822..c0b8c1169246b7cbfdf4931e908c805b5036aaa0 100644 (file)
@@ -2197,6 +2197,15 @@ The following options are used for running a testing Tor network.
     Try this often to download a v3 authority certificate before giving up.
     Changing this requires that **TestingTorNetwork** is set. (Default: 8)
 
+[[TestingDirAuthVoteExit]] **TestingDirAuthVoteExit** __node__,__node__,__...__::
+    A list of identity fingerprints, nicknames, country codes and
+    address patterns of nodes to vote Exit for regardless of their
+    uptime, bandwidth, or exit policy. See the **ExcludeNodes**
+    option for more information on how to specify nodes.
+ +
+    In order for this option to have any effect, **TestingTorNetwork**
+    has to be set.
+
 [[TestingDirAuthVoteGuard]] **TestingDirAuthVoteGuard** __node__,__node__,__...__::
     A list of identity fingerprints, nicknames, country codes and
     address patterns of nodes to vote Guard for regardless of their
index 921d03252972e2527f1381cb666591604c5f9262..3b37a123afcf76bc42c5e8fe40a97868202a9882 100644 (file)
@@ -439,6 +439,7 @@ static config_var_t option_vars_[] = {
   V(TestingDescriptorMaxDownloadTries, UINT, "8"),
   V(TestingMicrodescMaxDownloadTries, UINT, "8"),
   V(TestingCertMaxDownloadTries, UINT, "8"),
+  V(TestingDirAuthVoteExit, ROUTERSET, NULL),
   V(TestingDirAuthVoteGuard, ROUTERSET, NULL),
   VAR("___UsingTestNetworkDefaults", BOOL, UsingTestNetworkDefaults_, "0"),
 
index 374cfa6f40a15b8b07fb05753177681ec97b1c34..c8f47e648e17ee11d9789491ea446cea9a351ebd 100644 (file)
@@ -2169,12 +2169,19 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
     rs->ipv6_orport = ri->ipv6_orport;
   }
 
-  /* Iff we are in a testing network, use TestingDirAuthVoteGuard to
+  /* Iff we are in a testing network, use TestingDirAuthVoteExit to
+     give out Exit flags, and TestingDirAuthVoteGuard to
      give out Guard flags. */
-  if (options->TestingTorNetwork &&
-      routerset_contains_routerstatus(options->TestingDirAuthVoteGuard,
+  if (options->TestingTorNetwork) {
+    if (routerset_contains_routerstatus(options->TestingDirAuthVoteExit,
+                                        rs, 0)) {
+      rs->is_exit = 1;
+    }
+
+    if (routerset_contains_routerstatus(options->TestingDirAuthVoteGuard,
                                       rs, 0)) {
-    rs->is_possible_guard = 1;
+      rs->is_possible_guard = 1;
+    }
   }
 }
 
index 54cee46ee302f34db234d38351b8e51555100c3a..4130ea635112a3394171d622fe5f0da493c3f365 100644 (file)
@@ -4056,6 +4056,10 @@ typedef struct {
   /** Minimum value for the Fast flag threshold on testing networks. */
   uint64_t TestingMinFastFlagThreshold;
 
+  /** Relays in a testing network which should be voted Exit
+   * regardless of exit policy. */
+  routerset_t *TestingDirAuthVoteExit;
+
   /** Relays in a testing network which should be voted Guard
    * regardless of uptime and bandwidth. */
   routerset_t *TestingDirAuthVoteGuard;