summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-09-15 13:06:54 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-15 13:06:54 -0400
commit87f18c9578323cbb9229aba9a271bc7a6362a07a (patch)
treefa5333fcca5208d8dc8848bbe2cdec1d8e65300b
parent4e3373f7fe24c281b88c9a139854afa1c213d163 (diff)
downloadtor-87f18c9578323cbb9229aba9a271bc7a6362a07a.tar.gz
tor-87f18c9578323cbb9229aba9a271bc7a6362a07a.zip
Never queue a cell on a marked circuit
-rw-r--r--changes/bug11842
-rw-r--r--src/or/relay.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/bug1184 b/changes/bug1184
index 003ad0d916..856cdc644d 100644
--- a/changes/bug1184
+++ b/changes/bug1184
@@ -4,4 +4,6 @@
it may have been possible for a few queued cells to get relayed,
even though they would have been immediately dropped by the next
OR in the circuit. Fix 1184; bugfix on 0.2.0.1-alpha.
+ - Never queue a cell for a circuit that's already been marked
+ for close.
diff --git a/src/or/relay.c b/src/or/relay.c
index e740fbf595..6d51f18a3a 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -2272,6 +2272,9 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn,
{
cell_queue_t *queue;
int streams_blocked;
+ if (circ->marked_for_close)
+ return;
+
if (direction == CELL_DIRECTION_OUT) {
queue = &circ->n_conn_cells;
streams_blocked = circ->streams_blocked_on_n_conn;