summaryrefslogtreecommitdiff
path: root/src/feature/dirauth/voteflags.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-06-25 14:52:22 -0400
committerNick Mathewson <nickm@torproject.org>2020-06-26 08:37:36 -0400
commita7aa97298b47781a1bb1b9b78b10851db65d939d (patch)
tree7bc0046c2f851833ab0828eee72111a4eb908e88 /src/feature/dirauth/voteflags.c
parentdbc2b75009a781f2664b871a6033d47b04946299 (diff)
downloadtor-a7aa97298b47781a1bb1b9b78b10851db65d939d.tar.gz
tor-a7aa97298b47781a1bb1b9b78b10851db65d939d.zip
Remove special authority semantics for AssumeReachable.
AssumeReachable should only be about whether a relay thinks that it is reachable itself. But previously, we've had it also turn off reachability checking of _other_ relays on authorities. (Technically, reachability tests were still run, but we would ignore the results.) With this patch, there is a new AuthDirTestReachability option (default 1) that controls whether authorities run reachability tests. Making this change allows us to have test networks where authorities set AssumeReachable without disabling their reachability testing entirely. Closes ticket #34445.
Diffstat (limited to 'src/feature/dirauth/voteflags.c')
-rw-r--r--src/feature/dirauth/voteflags.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/dirauth/voteflags.c b/src/feature/dirauth/voteflags.c
index 477eb6f0b7..3938b61adb 100644
--- a/src/feature/dirauth/voteflags.c
+++ b/src/feature/dirauth/voteflags.c
@@ -487,7 +487,6 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
unreachable.
*/
int answer;
- const or_options_t *options = get_options();
const dirauth_options_t *dirauth_options = dirauth_get_options();
node_t *node = node_get_mutable_by_id(router->cache_info.identity_digest);
tor_assert(node);
@@ -501,8 +500,9 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
/* A hibernating router is down unless we (somehow) had contact with it
* since it declared itself to be hibernating. */
answer = 0;
- } else if (options->AssumeReachable) {
- /* If AssumeReachable, everybody is up unless they say they are down! */
+ } else if (! dirauth_options->AuthDirTestReachability) {
+ /* If we aren't testing reachability, then everybody is up unless they say
+ * they are down. */
answer = 1;
} else {
/* Otherwise, a router counts as up if we found all announced OR