summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-06-09 09:08:48 +0000
committerRoger Dingledine <arma@torproject.org>2006-06-09 09:08:48 +0000
commit4162f5fc7a2cb161ecf35cbb168521b8ac173a75 (patch)
treea796fab620dacb2e1ee69ccde21f416112ca2e83
parentfd000f5f97d47594b6f9ea7fde64c414bd362626 (diff)
downloadtor-4162f5fc7a2cb161ecf35cbb168521b8ac173a75.tar.gz
tor-4162f5fc7a2cb161ecf35cbb168521b8ac173a75.zip
a minimal (ha) backport of the entrynodes fix.
svn:r6577
-rw-r--r--src/or/circuitbuild.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 75d3524920..63c942b65f 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1548,6 +1548,14 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
smartlist_add(excluded, r);
}
}
+ /* and exclude current entry guards, if applicable */
+ if (options->UseEntryGuards && entry_guards) {
+ SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry,
+ {
+ if ((r = router_get_by_digest(entry->identity)))
+ smartlist_add(excluded, r);
+ });
+ }
// XXX we should exclude busy exit nodes here, too,
// but only if there are enough other nodes available.
choice = router_choose_random_node(