diff options
author | teor <teor2345@gmail.com> | 2014-12-26 00:17:08 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-30 09:06:00 -0500 |
commit | 55ad54e0146234578072080842ec0f4ca628e4c7 (patch) | |
tree | 13800d49b89e032fa3699c7777b5f5d176c9ab0f /src/or/nodelist.h | |
parent | 9b2d106e49ba4ea12f31af9cea02910869f19a4b (diff) | |
download | tor-55ad54e0146234578072080842ec0f4ca628e4c7.tar.gz tor-55ad54e0146234578072080842ec0f4ca628e4c7.zip |
Allow tor to build circuits using a consensus with no exits
If the consensus has no exits (typical of a bootstrapping
test network), allow tor to build circuits once enough
descriptors have been downloaded.
When there are no exits, we always have "enough"
exit descriptors. (We treat the proportion of available
exit descriptors as 100%.)
This assists in bootstrapping a testing Tor network.
Fixes bug 13718.
Makes bug 13161's TestingDirAuthVoteExit non-essential.
(But still useful for speeding up a bootstrap.)
Diffstat (limited to 'src/or/nodelist.h')
-rw-r--r-- | src/or/nodelist.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/nodelist.h b/src/or/nodelist.h index 56cfffa9f1..2e59da673e 100644 --- a/src/or/nodelist.h +++ b/src/or/nodelist.h @@ -79,6 +79,14 @@ int node_is_unreliable(const node_t *router, int need_uptime, int router_exit_policy_all_nodes_reject(const tor_addr_t *addr, uint16_t port, int need_uptime); void router_set_status(const char *digest, int up); + +/** router_have_minimum_dir_info tests to see if we have enough + * descriptor information to create circuits. + * If there are exits in the consensus, we wait until we have enough + * info to create exit paths before creating any circuits. If there are + * no exits in the consensus, we wait for enough info to create internal + * paths, and should avoid creating exit paths, as they will simply fail. + * We make sure we create all available circuit types at the same time. */ int router_have_minimum_dir_info(void); /** Set to CONSENSUS_PATH_EXIT if there is at least one exit node |