aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-03-11 03:57:01 -0500
committerNick Mathewson <nickm@torproject.org>2011-04-26 23:54:13 -0400
commit719b5b87dee4910bb3e2d29db6e2012416f60d3d (patch)
tree3c6db8696ccf5a48faf25153d1d2e0da7e82ad64 /src
parent7e2e8074d52f9ace76d98a62d67a4bf781f06c3b (diff)
downloadtor-719b5b87dee4910bb3e2d29db6e2012416f60d3d.tar
tor-719b5b87dee4910bb3e2d29db6e2012416f60d3d.tar.gz
don't exit enclave to excluded relays
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 29e2e9636..523596ddd 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1538,6 +1538,8 @@ routerlist_find_my_routerinfo(void)
/** Find a router that's up, that has this IP address, and
* that allows exit to this address:port, or return NULL if there
* isn't a good one.
+ * Don't exit enclave to excluded relays -- it wouldn't actually
+ * hurt anything, but this way there are fewer confused users.
*/
routerinfo_t *
router_find_exact_exit_enclave(const char *address, uint16_t port)
@@ -1545,6 +1547,7 @@ router_find_exact_exit_enclave(const char *address, uint16_t port)
uint32_t addr;
struct in_addr in;
tor_addr_t a;
+ or_options_t *options = get_options();
if (!tor_inet_aton(address, &in))
return NULL; /* it's not an IP already */
@@ -1557,7 +1560,8 @@ router_find_exact_exit_enclave(const char *address, uint16_t port)
if (router->addr == addr &&
router->is_running &&
compare_tor_addr_to_addr_policy(&a, port, router->exit_policy) ==
- ADDR_POLICY_ACCEPTED)
+ ADDR_POLICY_ACCEPTED &&
+ !routerset_contains_router(options->_ExcludeExitNodesUnion, router))
return router;
});
return NULL;