aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-06-14 01:40:02 -0700
committerNick Mathewson <nickm@torproject.org>2011-11-30 14:54:15 -0500
commitc90c33fd53463b67810b4e2b4c994e952e087698 (patch)
tree9df8986e72e9f3e90b0b31019479b956fd4049ee /src
parent328c9582a90f65c5f21d05f2de889bc2286dc0ff (diff)
downloadtor-c90c33fd53463b67810b4e2b4c994e952e087698.tar
tor-c90c33fd53463b67810b4e2b4c994e952e087698.tar.gz
Turn off LearnCircuitBuildTimeout when tor2web mode is on
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 734efdf74..1dd5ed72c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3524,6 +3524,24 @@ options_validate(or_options_t *old_options, or_options_t *options,
options->RendPostPeriod = MAX_DIR_PERIOD;
}
+ if (options->Tor2webMode && options->LearnCircuitBuildTimeout) {
+ /* LearnCircuitBuildTimeout and Tor2webMode are incompatible in
+ * two ways:
+ *
+ * - LearnCircuitBuildTimeout results in a low CBT, which
+ * Tor2webMode's use of one-hop rendezvous circuits lowers
+ * much further, producing *far* too many timeouts.
+ *
+ * - The adaptive CBT code does not update its timeout estimate
+ * using build times for single-hop circuits.
+ *
+ * If we fix both of these issues someday, we should test
+ * Tor2webMode with LearnCircuitBuildTimeout on again. */
+ log_notice(LD_CONFIG,"Tor2webMode is enabled; turning "
+ "LearnCircuitBuildTimeout off.");
+ options->LearnCircuitBuildTimeout = 0;
+ }
+
if (options->MaxCircuitDirtiness < MIN_MAX_CIRCUIT_DIRTINESS) {
log_warn(LD_CONFIG, "MaxCircuitDirtiness option is too short; "
"raising to %d seconds.", MIN_MAX_CIRCUIT_DIRTINESS);