diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-06-04 12:16:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-06-04 12:16:03 -0400 |
commit | e74c3601567ab0ca14c5e2a7b9b40b416a47001e (patch) | |
tree | 47ac59929aaa06998e0260888e1a9a7efc22f18e /src | |
parent | ea44287657aeedc9d395b6978b8d7ce6a93e12af (diff) | |
parent | 84ed086d4858ed14de4a4a8bfc3283a73b7c4657 (diff) | |
download | tor-e74c3601567ab0ca14c5e2a7b9b40b416a47001e.tar tor-e74c3601567ab0ca14c5e2a7b9b40b416a47001e.tar.gz |
Merge remote-tracking branch 'public/bug12195'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/command.c b/src/or/command.c index 9b3ff16f2..105bdc637 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -376,7 +376,7 @@ command_process_created_cell(cell_t *cell, channel_t *chan) return; } - if (circ->n_circ_id != cell->circ_id) { + if (circ->n_circ_id != cell->circ_id || circ->n_chan != chan) { log_fn(LOG_PROTOCOL_WARN,LD_PROTOCOL, "got created cell from Tor client? Closing."); circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL); @@ -461,6 +461,7 @@ command_process_relay_cell(cell_t *cell, channel_t *chan) } if (!CIRCUIT_IS_ORIGIN(circ) && + chan == TO_OR_CIRCUIT(circ)->p_chan && cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) direction = CELL_DIRECTION_OUT; else @@ -529,6 +530,7 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan) circ->received_destroy = 1; if (!CIRCUIT_IS_ORIGIN(circ) && + chan == TO_OR_CIRCUIT(circ)->p_chan && cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) { /* the destroy came from behind */ circuit_set_p_circid_chan(TO_OR_CIRCUIT(circ), 0, NULL); |