Don't exit when marking a newly created _C_INTRODUCING circ for close

This commit is contained in:
Robert Ransom 2011-12-28 09:02:14 -08:00
parent 78f43c5d03
commit 2b189a222b
2 changed files with 16 additions and 9 deletions

7
changes/bug4796 Normal file
View File

@ -0,0 +1,7 @@
o Minor bugfixes:
- Don't exit with an assertion failure when we mark a new
client-side hidden-service introduction circuit for close during
the process of creating it. Bugfix on 0.2.3.6-alpha. Fixes bug
4796; reported by murb.

View File

@ -1275,8 +1275,7 @@ _circuit_mark_for_close(circuit_t *circ, int reason, int line,
} else if (circ->purpose == CIRCUIT_PURPOSE_C_INTRODUCING &&
reason != END_CIRC_REASON_TIMEOUT) {
origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ);
tor_assert(ocirc->build_state->chosen_exit);
tor_assert(ocirc->rend_data);
if (ocirc->build_state->chosen_exit && ocirc->rend_data) {
log_info(LD_REND, "Failed intro circ %s to %s "
"(building circuit to intro point). "
"Marking intro point as possibly unreachable.",
@ -1286,6 +1285,7 @@ _circuit_mark_for_close(circuit_t *circ, int reason, int line,
ocirc->rend_data,
INTRO_POINT_FAILURE_UNREACHABLE);
}
}
if (circ->n_conn) {
circuit_clear_cell_queue(circ, circ->n_conn);
connection_or_send_destroy(circ->n_circ_id, circ->n_conn, reason);