[or-cvs] r17091: {tor} Patch from rovv: when we have no pending streams, choose exi (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Oct 14 17:05:53 UTC 2008


Author: nickm
Date: 2008-10-14 13:05:52 -0400 (Tue, 14 Oct 2008)
New Revision: 17091

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/circuitbuild.c
Log:
Patch from rovv: when we have no pending streams, choose exits with choose_good_exit_server_general() rather than with circuit_get_unhandled_ports() and friends.  Bugfix on 0.1.1.x, at least.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-10-14 16:20:19 UTC (rev 17090)
+++ tor/trunk/ChangeLog	2008-10-14 17:05:52 UTC (rev 17091)
@@ -8,6 +8,9 @@
     - Minor fix in the warning messages when you're having problems
       bootstrapping; also, be more forgiving of bootstrap problems when
       we're still making incremental progress on a given bootstrap phase.
+    - When we're choosing an exit node for a circuit, and we have no pending
+      streams, choose a good general exit rather than one that supports "all
+      the pending streams".  Bugfix on 0.1.1.x. (Fix by rovv.)
 
 
 Changes in version 0.2.1.6-alpha - 2008-09-30

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2008-10-14 16:20:19 UTC (rev 17090)
+++ tor/trunk/src/or/circuitbuild.c	2008-10-14 17:05:52 UTC (rev 17091)
@@ -1265,6 +1265,11 @@
 //               router->nickname, i);
       }
     }); /* End looping over connections. */
+    if (n_pending_connections > 0 && n_supported[i] == 0) {
+      /* Leave best_support at -1 if that's where it is, so we can
+       * distinguish it later. */
+      continue;
+    }
     if (n_supported[i] > best_support) {
       /* If this router is better than previous ones, remember its index
        * and goodness, and start counting how many routers are this good. */



More information about the tor-commits mailing list