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

[or-cvs] r15850: When relays do their initial bandwidth measurement, don't li (in tor/trunk: . src/or)



Author: arma
Date: 2008-07-11 17:42:09 -0400 (Fri, 11 Jul 2008)
New Revision: 15850

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/circuitbuild.c
Log:
When relays do their initial bandwidth measurement, don't limit
to just our our entry guards for the test circuits. Otherwise we
tend to have multiple test circuits going through a single entry
guard, which makes our bandwidth test less accurate. Fixes part
of bug 654; patch contributed by Josh Albrecht.

(Actually, modify Josh's patch to avoid doing that when you're
a bridge relay, since it would leak more than we want to leak.)


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-07-11 21:39:45 UTC (rev 15849)
+++ tor/trunk/ChangeLog	2008-07-11 21:42:09 UTC (rev 15850)
@@ -9,6 +9,13 @@
       on the client side when connecting to a hidden service. Bugfix
       on 0.0.6pre1. Found and fixed by Christian Wilms; resolves bug 743.
 
+  o Minor features:
+    - When relays do their initial bandwidth measurement, don't limit
+      to just our our entry guards for the test circuits. Otherwise we
+      tend to have multiple test circuits going through a single entry
+      guard, which makes our bandwidth test less accurate. Fixes part
+      of bug 654; patch contributed by Josh Albrecht.
+
   o Minor bugfixes:
     - Change the contrib/tor.logrotate script so it makes the new
       logs as "_tor:_tor" rather than the default, which is generally

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2008-07-11 21:39:45 UTC (rev 15849)
+++ tor/trunk/src/or/circuitbuild.c	2008-07-11 21:42:09 UTC (rev 15850)
@@ -1621,9 +1621,9 @@
   routerinfo_t *r, *choice;
   smartlist_t *excluded;
   or_options_t *options = get_options();
-  (void)purpose; /* not used yet. */
 
-  if (state && options->UseEntryGuards) {
+  if (state && options->UseEntryGuards &&
+      (purpose != CIRCUIT_PURPOSE_TESTING || options->BridgeRelay)) {
     return choose_random_entry(state);
   }