aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-24 11:03:38 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-24 11:03:38 -0400
commit6300a9548dcbe11935db374c7e7455743f3283c3 (patch)
treee99a511d7153dbc6f4f28a2eb275185c3033a90c /src/feature/hs
parent28413e75605cc2d05a2a3e4c766bfbe0a47d848d (diff)
downloadtor-6300a9548dcbe11935db374c7e7455743f3283c3.tar.gz
tor-6300a9548dcbe11935db374c7e7455743f3283c3.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>
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_circuit.c11
1 files changed, 11 insertions, 0 deletions
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