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

[tor-commits] [tor/maint-0.2.4] Fix a logic error in circuit_stream_is_being_handled.



commit b5d13d11c90cb94193b6071e8c525f75cc77b861
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Sat Dec 21 10:15:09 2013 -0500

    Fix a logic error in circuit_stream_is_being_handled.
    
    When I introduced the unusable_for_new_circuits flag in
    62fb209d837f3f551, I had a spurious ! in the
    circuit_stream_is_being_handled loop.  This made us decide that
    non-unusable circuits (that is, usable ones) were the ones to avoid,
    and caused it to launch a bunch of extra circuits.
    
    Fixes bug 10456; bugfix on 0.2.4.12-alpha.
---
 changes/bug10456    |    6 ++++++
 src/or/circuituse.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/changes/bug10456 b/changes/bug10456
new file mode 100644
index 0000000..fb3b92f
--- /dev/null
+++ b/changes/bug10456
@@ -0,0 +1,6 @@
+  o Major bugfixes:
+    - Avoid launching spurious extra circuits when a stream is pending.
+      This fixes a bug where any circuit that _wasn't_ unusable for new
+      streams would be treated as if it were, causing extra circuits to
+      be launched. Fixes bug 10456; bugfix on 0.2.4.12-alpha.
+
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 25997eb..5984691 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -828,7 +828,7 @@ circuit_stream_is_being_handled(entry_connection_t *conn,
       cpath_build_state_t *build_state = origin_circ->build_state;
       if (build_state->is_internal || build_state->onehop_tunnel)
         continue;
-      if (!origin_circ->unusable_for_new_conns)
+      if (origin_circ->unusable_for_new_conns)
         continue;
 
       exitnode = build_state_get_exit_node(build_state);



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