diff options
author | teor <teor2345@gmail.com> | 2014-10-01 17:44:21 +1000 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2014-10-01 17:44:21 +1000 |
commit | 27f30040f63d13234d07e58cf3d0d2a3cbd93ce5 (patch) | |
tree | 8713c3788c3f0697c37d7327a070890609d5fe9f /src/or/dirserv.c | |
parent | b448ec195dd8687d2d5f363e12fec046eb2d1677 (diff) | |
download | tor-27f30040f63d13234d07e58cf3d0d2a3cbd93ce5.tar.gz tor-27f30040f63d13234d07e58cf3d0d2a3cbd93ce5.zip |
Add TestingDirAuthVoteExit option (like TestingDirAuthVoteGuard)
Add the TestingDirAuthVoteExit option, a list of nodes to vote Exit for,
regardless of their uptime, bandwidth, or exit policy.
TestingTorNetwork must be set for this option to have any effect.
Works around an issue where authorities would take up to 35 minutes to
give nodes the Exit flag in a test network, despite short consensus
intervals. Partially implements ticket 13161.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 374cfa6f40..c8f47e648e 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2169,12 +2169,19 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, rs->ipv6_orport = ri->ipv6_orport; } - /* Iff we are in a testing network, use TestingDirAuthVoteGuard to + /* Iff we are in a testing network, use TestingDirAuthVoteExit to + give out Exit flags, and TestingDirAuthVoteGuard to give out Guard flags. */ - if (options->TestingTorNetwork && - routerset_contains_routerstatus(options->TestingDirAuthVoteGuard, + if (options->TestingTorNetwork) { + if (routerset_contains_routerstatus(options->TestingDirAuthVoteExit, + rs, 0)) { + rs->is_exit = 1; + } + + if (routerset_contains_routerstatus(options->TestingDirAuthVoteGuard, rs, 0)) { - rs->is_possible_guard = 1; + rs->is_possible_guard = 1; + } } } |