diff options
author | teor <teor2345@gmail.com> | 2015-01-10 21:43:31 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2015-01-10 22:34:28 +1100 |
commit | f9d57473e1ff34f1ec56c62dd9ea138ceec42d6f (patch) | |
tree | 726c49430523377ff857706fc73302059b93dd9c /src/or/dirserv.c | |
parent | e136606fe8325140f26dda26d2f634961aae5448 (diff) | |
download | tor-f9d57473e1ff34f1ec56c62dd9ea138ceec42d6f.tar.gz tor-f9d57473e1ff34f1ec56c62dd9ea138ceec42d6f.zip |
Create TestingDirAuthVoteHSDir like TestingDirAuthVoteExit/Guard
TestingDirAuthVoteHSDir ensures that authorities vote the HSDir flag
for the listed relays regardless of uptime or ORPort connectivity.
Respects the value of VoteOnHidServDirectoriesV2.
Partial fix for bug 14067.
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 d668749c5b..8abe6cb778 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2113,9 +2113,10 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, rs->ipv6_orport = ri->ipv6_orport; } - /* Iff we are in a testing network, use TestingDirAuthVoteExit to - give out Exit flags, and TestingDirAuthVoteGuard to - give out Guard flags. */ + /* Iff we are in a testing network, use TestingDirAuthVoteExit, + TestingDirAuthVoteGuard, and TestingDirAuthVoteHSDir to + give out the Exit, Guard, and HSDir flags, respectively. + But don't set the corresponding node flags. */ if (options->TestingTorNetwork) { if (routerset_contains_routerstatus(options->TestingDirAuthVoteExit, rs, 0)) { @@ -2123,9 +2124,15 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, } if (routerset_contains_routerstatus(options->TestingDirAuthVoteGuard, - rs, 0)) { + rs, 0)) { rs->is_possible_guard = 1; } + + if (routerset_contains_routerstatus(options->TestingDirAuthVoteHSDir, + rs, 0)) { + /* TestingDirAuthVoteHSDir respects VoteOnHidServDirectoriesV2 */ + rs->is_hs_dir = vote_on_hsdirs; + } } } |