diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-11 11:06:22 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-09-11 13:38:58 -0400 |
commit | b71f4ecb8d289f0d8a44eaadedf51773640ff2b8 (patch) | |
tree | 57b2aec2cd0ccfec44ccf9098bf2e8d6a02c6da7 /src/or/hs_client.c | |
parent | 67a5d4cb60a9f27e981b83195cf47183a7e9abcc (diff) | |
download | tor-b71f4ecb8d289f0d8a44eaadedf51773640ff2b8.tar.gz tor-b71f4ecb8d289f0d8a44eaadedf51773640ff2b8.zip |
hs: Handled REND_JOINED circuit when getting an INTRODUCE_ACK
Because we can get a RENDEZVOUS2 cell before the INTRODUCE_ACK, we need to
correctly handle the circuit purpose REND_JOINED that is not change its
purpose when we get an INTRODUCE_ACK and simply close the intro circuit
normally.
Fixes #23455
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_client.c')
-rw-r--r-- | src/or/hs_client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/hs_client.c b/src/or/hs_client.c index f85ebc8473..652b7cf74f 100644 --- a/src/or/hs_client.c +++ b/src/or/hs_client.c @@ -746,6 +746,14 @@ handle_introduce_ack_success(origin_circuit_t *intro_circ) } assert_circ_anonymity_ok(rend_circ, get_options()); + + /* It is possible to get a RENDEZVOUS2 cell before the INTRODUCE_ACK which + * means that the circuit will be joined and already transmitting data. In + * that case, simply skip the purpose change and close the intro circuit + * like it should be. */ + if (TO_CIRCUIT(rend_circ)->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) { + goto end; + } circuit_change_purpose(TO_CIRCUIT(rend_circ), CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED); /* Set timestamp_dirty, because circuit_expire_building expects it to |