summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-22 09:09:17 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-22 09:09:17 -0400
commit5df265ae55f8e7b056a34b1a9006c73a584cbe80 (patch)
tree5a8be37332630510b0b9966538759bc0de145b4f
parent2db94810bf26d92525048fe998967b91d83db291 (diff)
parentdc5c9af6c383b97b47f86b3860e9693686bf0466 (diff)
downloadtor-5df265ae55f8e7b056a34b1a9006c73a584cbe80.tar.gz
tor-5df265ae55f8e7b056a34b1a9006c73a584cbe80.zip
Merge branch 'maint-0.3.0' into release-0.3.0
-rw-r--r--changes/bug236104
-rw-r--r--src/or/hs_intropoint.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/changes/bug23610 b/changes/bug23610
new file mode 100644
index 0000000000..f2dc8bd1a6
--- /dev/null
+++ b/changes/bug23610
@@ -0,0 +1,4 @@
+ 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.
diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index e065ef64f4..bc493e297e 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -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);