소스 검색

Never queue a cell on a marked circuit

Nick Mathewson 16 년 전
부모
커밋
87f18c9578
2개의 변경된 파일과 5개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      changes/bug1184
  2. 3 0
      src/or/relay.c

+ 2 - 0
changes/bug1184

@@ -4,4 +4,6 @@
       it may have been possible for a few queued cells to get relayed,
       it may have been possible for a few queued cells to get relayed,
       even though they would have been immediately dropped by the next
       even though they would have been immediately dropped by the next
       OR in the circuit.  Fix 1184; bugfix on 0.2.0.1-alpha.
       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.
 
 

+ 3 - 0
src/or/relay.c

@@ -2272,6 +2272,9 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn,
 {
 {
   cell_queue_t *queue;
   cell_queue_t *queue;
   int streams_blocked;
   int streams_blocked;
+  if (circ->marked_for_close)
+    return;
+
   if (direction == CELL_DIRECTION_OUT) {
   if (direction == CELL_DIRECTION_OUT) {
     queue = &circ->n_conn_cells;
     queue = &circ->n_conn_cells;
     streams_blocked = circ->streams_blocked_on_n_conn;
     streams_blocked = circ->streams_blocked_on_n_conn;