]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid a double-mark bug when makring a pending circuit as "too old"
authorNick Mathewson <nickm@torproject.org>
Wed, 15 Mar 2017 13:19:00 +0000 (09:19 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 15 Mar 2017 15:05:37 +0000 (11:05 -0400)
Fixes bug 20059; bugfix on 0.1.0.1-rc.

changes/bug20059 [new file with mode: 0644]
src/or/onion.c

diff --git a/changes/bug20059 b/changes/bug20059
new file mode 100644 (file)
index 0000000..091fab0
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (relay):
+    - Avoid a double-marked-circuit warning that can happen when we receive
+      DESTROY cells under heavy load. Fixes bug 20059; bugfix on 0.1.0.1-rc.
index 1a0bcf106e2a78f11bd7a99a32f84d833e31c35b..de4b6a584534165b2c698be93da83f09999610a8 100644 (file)
@@ -184,7 +184,9 @@ onion_pending_add(or_circuit_t *circ, create_cell_t *onionskin)
     onion_queue_entry_remove(head);
     log_info(LD_CIRC,
              "Circuit create request is too old; canceling due to overload.");
-    circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT);
+    if (! TO_CIRCUIT(circ)->marked_for_close) {
+      circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT);
+    }
   }
   return 0;
 }