aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-24 11:03:38 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-26 15:05:44 -0400
commita7aa22a4e76d0076e4c46f474708d2386c3139c6 (patch)
tree4a9e43e7a6b36509dda758bcc57172fdd93b51da
parent0a49e04691b6f6efedadc003521cd0e5809f81da (diff)
downloadtor-a7aa22a4e76d0076e4c46f474708d2386c3139c6.tar.gz
tor-a7aa22a4e76d0076e4c46f474708d2386c3139c6.zip
hs: Retry rdv circuit if repurposed
This can happen if our measurement subsystem decides to snatch it. Fixes #40696 Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r--changes/ticket406963
-rw-r--r--src/feature/hs/hs_circuit.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/changes/ticket40696 b/changes/ticket40696
new file mode 100644
index 0000000000..a2c09f6a83
--- /dev/null
+++ b/changes/ticket40696
@@ -0,0 +1,3 @@
+ o Minor bugfixes (onion service):
+ - Make the service retry a rendezvous if the circuit is being repurposed for
+ measurements. Fixes bug 40696; bugfix on 0.3.5.1-alpha.
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index d253802f79..edb5e692e7 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -1319,6 +1319,17 @@ hs_circ_cleanup_on_repurpose(circuit_t *circ)
if (circ->hs_token) {
hs_circuitmap_remove_circuit(circ);
}
+
+ switch (circ->purpose) {
+ case CIRCUIT_PURPOSE_S_CONNECT_REND:
+ /* This circuit was connecting to a rendezvous point but it is being
+ * repurposed so we need to relaunch an attempt else the client will be
+ * left hanging waiting for the rendezvous. */
+ hs_circ_retry_service_rendezvous_point(TO_ORIGIN_CIRCUIT(circ));
+ break;
+ default:
+ break;
+ }
}
/** Return true iff the given established client rendezvous circuit was sent