]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When relays do their initial bandwidth measurement, don't limit
authorRoger Dingledine <arma@torproject.org>
Fri, 11 Jul 2008 21:42:09 +0000 (21:42 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 11 Jul 2008 21:42:09 +0000 (21:42 +0000)
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.)

svn:r15850

ChangeLog
src/or/circuitbuild.c

index 204e85314233913b51efd86f2ff8c14d0491c61a..91593146974a3f928b01ac39baf30380d0a90bb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,13 @@ Changes in version 0.2.1.3-alpha - 2008-07-xx
       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
index 8e89daf40fb437ecfd63535a9dcbfae9cc200c43..3071f83f195de48a963d81d07947b08011bdc962 100644 (file)
@@ -1621,9 +1621,9 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
   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);
   }