diff options
author | Roger Dingledine <arma@torproject.org> | 2006-06-10 00:26:39 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-06-10 00:26:39 +0000 |
commit | 889b8d5bac2f1cd818142317c55689a4304a79ae (patch) | |
tree | faa13b85ab990f53d775a08025680086f331e3b4 /src/or/circuitbuild.c | |
parent | 1f585987c4b20cc12f789a9943abffa5d8205c7b (diff) | |
download | tor-889b8d5bac2f1cd818142317c55689a4304a79ae.tar.gz tor-889b8d5bac2f1cd818142317c55689a4304a79ae.zip |
Add a new config option TestVia, that lets you specify preferred middle
hops to use for testing circuits. Perhaps this will let me debug the
reachability problem better.
svn:r6581
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 0e08b03b49..7c09a25f5c 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1481,6 +1481,7 @@ choose_good_middle_server(uint8_t purpose, routerinfo_t *r, *choice; crypt_path_t *cpath; smartlist_t *excluded; + or_options_t *options = get_options(); tor_assert(_CIRCUIT_PURPOSE_MIN <= purpose && purpose <= _CIRCUIT_PURPOSE_MAX); @@ -1501,9 +1502,10 @@ choose_good_middle_server(uint8_t purpose, } } choice = router_choose_random_node( - NULL, get_options()->ExcludeNodes, excluded, + purpose == CIRCUIT_PURPOSE_TESTING ? options->TestVia : NULL, + options->ExcludeNodes, excluded, state->need_uptime, state->need_capacity, 0, - get_options()->_AllowInvalid & ALLOW_INVALID_MIDDLE, 0); + options->_AllowInvalid & ALLOW_INVALID_MIDDLE, 0); smartlist_free(excluded); return choice; } |