]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Never queue a cell on a marked circuit
authorNick Mathewson <nickm@torproject.org>
Wed, 15 Sep 2010 17:06:54 +0000 (13:06 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 15 Sep 2010 17:06:54 +0000 (13:06 -0400)
changes/bug1184
src/or/relay.c

index 003ad0d916a54d34da87241f37ef17f2a3531955..856cdc644d69f0b7bd749d86a7bd3a51a97cad5d 100644 (file)
@@ -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.
 
index e740fbf595b31df3b119a1da2896f90b709cf5a8..6d51f18a3a9a3801bc3ec8edcebf5091aea886ce 100644 (file)
@@ -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;