]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Jan 2015 15:19:07 +0000 (10:19 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Jan 2015 15:19:07 +0000 (10:19 -0500)
src/or/cpuworker.c

index 0785c671d9857e6e162d4100237bb93a09ec993b..3ddb37a262a5fb5c3d793f8bd449802ea78256d3 100644 (file)
@@ -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. "