]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
relay: No longer test dirport reachability for authorities
authorRoger Dingledine <arma@torproject.org>
Wed, 10 Feb 2021 08:10:12 +0000 (03:10 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 17 Feb 2021 15:28:18 +0000 (10:28 -0500)
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>
changes/bug40287 [new file with mode: 0644]
src/feature/relay/selftest.c

diff --git a/changes/bug40287 b/changes/bug40287
new file mode 100644 (file)
index 0000000..5a9c899
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (directory authority):
+    - Now that exit relays don't allow exit connections to directory authority
+      DirPorts (network reentry), disable authorities' reachability self test
+      on the DirPort. Fixes bug 40287; bugfix on 0.4.5.5-rc.
index 86b1533be15320e11254ced18271584c41c93613..46b4b20ffcfd57539c9f631e062b88f7fc4734d1 100644 (file)
@@ -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;