summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2021-02-10 03:10:12 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-17 10:28:18 -0500
commit8a8045c788b6883751b5ecbfbd3de4da0dfd313a (patch)
treef0f3f4d29c367c0d7543903418603da414eb22d7 /src
parent336c45f1a5b30b31cbb76a2622a6e80d755db2b5 (diff)
downloadtor-8a8045c788b6883751b5ecbfbd3de4da0dfd313a.tar.gz
tor-8a8045c788b6883751b5ecbfbd3de4da0dfd313a.zip
relay: No longer test dirport reachability for authorities
Now that exit relays don't allow exit connections to directory authority DirPorts, the follow-up step is to make directory authorities stop doing DirPort reachability checks. Fixes #40287 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r--src/feature/relay/selftest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index 86b1533be1..46b4b20ffc 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -31,6 +31,8 @@
#include "feature/control/control_events.h"
+#include "feature/dirauth/authmode.h"
+
#include "feature/dirclient/dirclient.h"
#include "feature/dircommon/directory.h"
@@ -142,12 +144,14 @@ router_orport_seems_reachable(const or_options_t *options,
* - we've seen a successful reachability check, or
* - there is no DirPort set, or
* - AssumeReachable is set, or
+ * - We're a dir auth (see ticket #40287), or
* - the network is disabled.
*/
int
router_dirport_seems_reachable(const or_options_t *options)
{
int reach_checks_disabled = router_reachability_checks_disabled(options) ||
+ authdir_mode(options) ||
!options->DirPort_set;
return reach_checks_disabled ||
can_reach_dir_port;