]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Let testing networks override ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG
authorNick Mathewson <nickm@torproject.org>
Wed, 20 Mar 2013 17:34:57 +0000 (13:34 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 20 Mar 2013 17:34:57 +0000 (13:34 -0400)
This adds a new option to fix bug 8508 which broke chutney
networks. The bug was introduced by 317d16de.

changes/bug8408 [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/bug8408 b/changes/bug8408
new file mode 100644 (file)
index 0000000..ae9cf17
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Allow TestingTorNetworks to override the 4096-byte minimum for the Fast
+      threshold. Otherwise they can't bootstrap until they've observed more
+      traffic. Fixes bug 8508; bugfix on 0.2.4.10-alpha.
index 3be90be8703d3a94f03fcc5d0e3fbdc5c4a32e01..5727ec30fcc2465133745ca393e697c3f0c8172a 100644 (file)
@@ -2019,6 +2019,11 @@ The following options are used for running a testing Tor network.
     time. Changing this requires that **TestingTorNetwork** is set. (Default:
     10 minutes)
 
+**TestingMinFastFlagThreshold** __N__ **bytes**|**KBytes**|**MBytes**|**GBytes**::
+    Minimum value for the Fast flag.  Overrides the ordinary minimum taken
+    from the consensus when TestingTorNetwork is set. (Default: 0.)
+
+
 SIGNALS
 -------
 
index 2b8eab7d63fa3b64376b3b84da64d3172d201d77..9e2230e769319c6085cb7761d26ab943d1b67bf0 100644 (file)
@@ -341,6 +341,7 @@ static config_var_t option_vars_[] = {
   V(PerConnBWRate,               MEMUNIT,  "0"),
   V(PidFile,                     STRING,   NULL),
   V(TestingTorNetwork,           BOOL,     "0"),
+  V(TestingMinFastFlagThreshold, MEMUNIT,  "0"),
   V(OptimisticData,              AUTOBOOL, "auto"),
   V(PortForwarding,              BOOL,     "0"),
   V(PortForwardingHelper,        FILENAME, "tor-fw-helper"),
index 8e8f79a1716653329d9d7a91fa5c2bb8c4b34a5e..81f328a647b65ab7314cba995566af85b4be7e7e 100644 (file)
@@ -2005,6 +2005,9 @@ dirserv_compute_performance_thresholds(routerlist_t *rl,
       ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG,
       ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG,
       INT32_MAX);
+    if (options->TestingTorNetwork) {
+      min_fast = (int32_t)options->TestingMinFastFlagThreshold;
+    }
     max_fast = networkstatus_get_param(NULL, "FastFlagMaxThreshold",
                                        INT32_MAX, min_fast, INT32_MAX);
     if (fast_bandwidth < (uint32_t)min_fast)
index 67315522edf6b2a8cc1cdb87528022eef9e95848..2b0102de32c8390d8369df83392143911f9f92da 100644 (file)
@@ -3910,6 +3910,9 @@ typedef struct {
    * of certain configuration options. */
   int TestingTorNetwork;
 
+  /** Minimum value for the Fast flag threshold on testing networks. */
+  uint64_t TestingMinFastFlagThreshold;
+
   /** If true, and we have GeoIP data, and we're a bridge, keep a per-country
    * count of how many client addresses have contacted us so that we can help
    * the bridge authority guess which countries have blocked access to us. */