aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-07-11 21:42:09 +0000
committerRoger Dingledine <arma@torproject.org>2008-07-11 21:42:09 +0000
commit267e61d0f3eaf1c4e2bb0b910417917468e93814 (patch)
tree435fb8e5ad2d8b987f840b09848d43ceacaa9afc /src/or/circuitbuild.c
parent53f558decc4cb79b72d5bd26c061de03d880cb91 (diff)
downloadtor-267e61d0f3eaf1c4e2bb0b910417917468e93814.tar.gz
tor-267e61d0f3eaf1c4e2bb0b910417917468e93814.zip
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.) svn:r15850
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8e89daf40f..3071f83f19 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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);
}