aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-03-14 06:37:17 +1000
committerteor <teor@torproject.org>2019-03-14 06:37:17 +1000
commit90301247fd35225cc25b6ea2568364356ff00580 (patch)
treea81ffb939af207aa70d32e96d8a64d2c7851f61b
parent530304dd773b178c7cc0c5db26e53ec196219191 (diff)
parent981bb60575953fbf0e6ca03ccf0a8a476e6644e0 (diff)
downloadtor-90301247fd35225cc25b6ea2568364356ff00580.tar.gz
tor-90301247fd35225cc25b6ea2568364356ff00580.zip
Merge remote-tracking branch 'tor-github/pr/765' into maint-0.2.9
-rw-r--r--changes/bug236815
-rw-r--r--src/or/circuituse.c18
2 files changed, 13 insertions, 10 deletions
diff --git a/changes/bug23681 b/changes/bug23681
new file mode 100644
index 0000000000..e317f36d50
--- /dev/null
+++ b/changes/bug23681
@@ -0,0 +1,5 @@
+ o Minor bugfixes (hidden service client):
+ - The introduction circuit was being timed out too quickly while waiting
+ for the rendezvous circuit to complete. Keep the intro circuit around
+ longer instead of timing out and reopening new ones constantly. Fixes
+ bug 23681; bugfix on 0.2.4.8-alpha.
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 96cd3cd7e8..eaf16ecbff 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -494,8 +494,7 @@ circuit_expire_building(void)
cutoff = begindir_cutoff;
else if (victim->purpose == CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT)
cutoff = close_cutoff;
- else if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING ||
- victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT)
+ else if (victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT)
cutoff = c_intro_cutoff;
else if (victim->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)
cutoff = s_intro_cutoff;
@@ -614,12 +613,13 @@ circuit_expire_building(void)
TO_ORIGIN_CIRCUIT(victim)->path_state = PATH_STATE_USE_FAILED;
break;
case CIRCUIT_PURPOSE_C_INTRODUCING:
- /* We keep old introducing circuits around for
- * a while in parallel, and they can end up "opened".
- * We decide below if we're going to mark them timed
- * out and eventually close them.
- */
- break;
+ /* That purpose means that the intro point circuit has been opened
+ * succesfully but the INTRODUCE1 cell hasn't been sent yet because
+ * the client is waiting for the rendezvous point circuit to open.
+ * Keep this circuit open while waiting for the rendezvous circuit.
+ * We let the circuit idle timeout take care of cleaning this
+ * circuit if it never used. */
+ continue;
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
@@ -713,8 +713,6 @@ circuit_expire_building(void)
NULL)
break;
/* fallthrough! */
- case CIRCUIT_PURPOSE_C_INTRODUCING:
- /* connection_ap_handshake_attach_circuit() will relaunch for us */
case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
/* If we have reached this line, we want to spare the circ for now. */