diff options
author | David Goulet <dgoulet@torproject.org> | 2017-04-25 13:49:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-09 10:30:52 -0400 |
commit | 09bc858dd54101e645b31bf32fe463b73c38add2 (patch) | |
tree | 24494f8629a5d8eb9cbe6a6dd346a0afa06353e2 /src/or/routerlist.c | |
parent | d52a1e2faaf0edf8f5899c6fa9864d0cecebf692 (diff) | |
download | tor-09bc858dd54101e645b31bf32fe463b73c38add2.tar.gz tor-09bc858dd54101e645b31bf32fe463b73c38add2.zip |
config: Remove ExcludeSingleHopRelays option
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans
up the code associated with it.
Partially fixes #22060
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index b3b959a291..0332054809 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2807,14 +2807,12 @@ router_choose_random_node(smartlist_t *excludedsmartlist, rule = weight_for_exit ? WEIGHT_FOR_EXIT : (need_guard ? WEIGHT_FOR_GUARD : WEIGHT_FOR_MID); - /* Exclude relays that allow single hop exit circuits, if the user - * wants to (such relays might be risky) */ - if (get_options()->ExcludeSingleHopRelays) { - SMARTLIST_FOREACH(nodelist_get_list(), node_t *, node, - if (node_allows_single_hop_exits(node)) { - smartlist_add(excludednodes, node); - }); - } + /* Exclude relays that allow single hop exit circuits. This is an obsolete + * option since 0.2.9.2-alpha and done by default in 0.3.1.0-alpha. */ + SMARTLIST_FOREACH(nodelist_get_list(), node_t *, node, + if (node_allows_single_hop_exits(node)) { + smartlist_add(excludednodes, node); + }); if ((r = routerlist_find_my_routerinfo())) routerlist_add_node_and_family(excludednodes, r); |