[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked



commit a598d0f575afab3836a48c9efc9f59e2bd5beab1
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Jan 26 10:19:07 2015 -0500

    Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked
---
 src/or/cpuworker.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 0785c67..3ddb37a 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -347,6 +347,12 @@ cpuworker_onion_handshake_replyfn(void *work_)
 
   circ->workqueue_entry = NULL;
 
+  if (TO_CIRCUIT(circ)->marked_for_close) {
+    /* We already marked this circuit; we can't call it open. */
+    log_debug(LD_OR,"circuit is already marked.");
+    goto done_processing;
+  }
+
   if (rpl.success == 0) {
     log_debug(LD_OR,
               "decoding onionskin failed. "

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits