aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-03-09 14:27:50 -0500
committerNick Mathewson <nickm@torproject.org>2012-03-09 14:27:50 -0500
commit99bd5400e879e7313288f153f464e0b3bc0782e0 (patch)
tree8ee78f7f99e5fa6f587db1e640d819d1a1ba4aad /src
parent8abfcc080424654ae755de352999b3346ebcbb28 (diff)
downloadtor-99bd5400e879e7313288f153f464e0b3bc0782e0.tar
tor-99bd5400e879e7313288f153f464e0b3bc0782e0.tar.gz
Never choose a bridge as an exit. Bug 5342.
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 72ec9e488..decb18fc1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2704,7 +2704,11 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
n_supported[i] = -1;
continue; /* skip routers that are known to be down or bad exits */
}
-
+ if (router->purpose != ROUTER_PURPOSE_GENERAL) {
+ /* never pick a non-general node as a random exit. */
+ n_supported[i] = -1;
+ continue;
+ }
if (options->_ExcludeExitNodesUnion &&
routerset_contains_router(options->_ExcludeExitNodesUnion, router)) {
n_supported[i] = -1;