summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-05-29 08:21:43 -0700
committerNick Mathewson <nickm@torproject.org>2011-05-30 12:24:51 -0400
commit8fc02a8e0ca431e4b61e54ed0aa10e7f0215c340 (patch)
tree82f40c267f681375126fa8e8ae091ae4f8f41399
parent112d204fadab74426cc802e6d998a53f938a5248 (diff)
downloadtor-8fc02a8e0ca431e4b61e54ed0aa10e7f0215c340.tar.gz
tor-8fc02a8e0ca431e4b61e54ed0aa10e7f0215c340.zip
Use the normal four-hop CBT for client intro circuits
Fixes another part of bug 1297.
-rw-r--r--changes/bug1297a8
-rw-r--r--src/or/circuituse.c11
2 files changed, 8 insertions, 11 deletions
diff --git a/changes/bug1297a b/changes/bug1297a
index 459ef6534d..140b94e3b0 100644
--- a/changes/bug1297a
+++ b/changes/bug1297a
@@ -5,4 +5,12 @@
creation; it was supposed to be applied based on time since the
circuit entered its current state. Bugfix on 0.0.6; fixes part
of bug 1297.
+ - Use the same circuit timeout for client-side introduction
+ circuits as for other four-hop circuits. Previously,
+ client-side introduction circuits were closed after the same
+ timeout as single-hop directory-fetch circuits; this was
+ appropriate with the static circuit build timeout in 0.2.1.x and
+ earlier, but caused many hidden service access attempts to fail
+ with the adaptive CBT introduced in 0.2.2.2-alpha. Bugfix on
+ 0.2.2.2-alpha; fixes another part of bug 1297.
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 7289aa5c11..97ac5600a2 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -288,7 +288,6 @@ circuit_expire_building(void)
struct timeval general_cutoff, begindir_cutoff, fourhop_cutoff,
cannibalize_cutoff, close_cutoff, extremely_old_cutoff;
struct timeval now;
- struct timeval introcirc_cutoff;
cpath_build_state_t *build_state;
tor_gettimeofday(&now);
@@ -307,8 +306,6 @@ circuit_expire_building(void)
SET_CUTOFF(close_cutoff, circ_times.close_ms);
SET_CUTOFF(extremely_old_cutoff, circ_times.close_ms*2 + 1000);
- introcirc_cutoff = begindir_cutoff;
-
while (next_circ) {
struct timeval cutoff;
victim = next_circ;
@@ -325,8 +322,6 @@ circuit_expire_building(void)
cutoff = fourhop_cutoff;
else if (TO_ORIGIN_CIRCUIT(victim)->has_opened)
cutoff = cannibalize_cutoff;
- else if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING)
- cutoff = introcirc_cutoff;
else if (victim->purpose == CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT)
cutoff = close_cutoff;
else
@@ -337,12 +332,6 @@ circuit_expire_building(void)
#if 0
/* some debug logs, to help track bugs */
- if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING &&
- victim->timestamp_created <= introcirc_cutoff &&
- victim->timestamp_created > general_cutoff)
- log_info(LD_REND|LD_CIRC, "Timing out introduction circuit which we "
- "would not have done if it had been a general circuit.");
-
if (victim->purpose >= CIRCUIT_PURPOSE_C_INTRODUCING &&
victim->purpose <= CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
if (!victim->timestamp_dirty)