Skip to content
Snippets Groups Projects
Commit dc5c9af6 authored by David Goulet's avatar David Goulet :panda_face: Committed by Nick Mathewson
Browse files

hs: Avoid possible double circuit close on error


Fixes #23610

Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 746410fb
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (hidden service, relay):
- Avoid a possible double close of a circuit by the intro point on error
of sending the INTRO_ESTABLISHED cell. Fixes ticket 23610; bugfix on
0.3.0.1-alpha.
......@@ -253,7 +253,11 @@ handle_establish_intro(or_circuit_t *circ, const uint8_t *request,
goto done;
err:
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);
/* When sending the intro establish ack, on error the circuit can be marked
* as closed so avoid a double close. */
if (!TO_CIRCUIT(circ)->marked_for_close) {
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);
}
done:
hs_cell_establish_intro_free(parsed_cell);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment