diff options
author | Roger Dingledine <arma@torproject.org> | 2009-09-19 23:20:23 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-12-21 03:52:33 -0500 |
commit | 2138b05f17a755ca154a0e0aae28e5c9b7c9ac35 (patch) | |
tree | 5f42a7d6d9eafbfb160221777cf4b2fb9f2ac918 /src/or/circuitbuild.c | |
parent | cc73bc385331c09de3d12296db3731e89b7aff35 (diff) | |
download | tor-2138b05f17a755ca154a0e0aae28e5c9b7c9ac35.tar.gz tor-2138b05f17a755ca154a0e0aae28e5c9b7c9ac35.zip |
Use nodes in ExitNodes even if they're not fast/stable
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 8a1864ce87..5acfb3eb9e 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2105,10 +2105,16 @@ 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_is_unreliable(router, need_uptime, need_capacity, 0)) { - /* XXX022 don't skip if it's in ExitNodes */ + if (router_is_unreliable(router, need_uptime, need_capacity, 0) && + (!options->ExitNodes || + !routerset_contains_router(options->ExitNodes, router))) { + /* FFFF Someday, differentiate between a routerset that names + * routers, and a routerset that names countries, and only do this + * check if they've asked for specific exit relays. Or if the country + * they ask for is rare. Or something. */ n_supported[i] = -1; - continue; /* skip routers that are not suitable */ + continue; /* skip routers that are not suitable, unless we have + * ExitNodes set, in which case we asked for it */ } if (!(router->is_valid || options->_AllowInvalid & ALLOW_INVALID_EXIT)) { /* if it's invalid and we don't want it */ |