]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
relay: Avoid log reachability test for bandwidth test circuit
authorDavid Goulet <dgoulet@torproject.org>
Tue, 8 Dec 2020 16:58:10 +0000 (11:58 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 8 Dec 2020 19:51:31 +0000 (14:51 -0500)
Fixes #40205

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/ticket40205 [new file with mode: 0644]
src/feature/relay/selftest.c

diff --git a/changes/ticket40205 b/changes/ticket40205
new file mode 100644 (file)
index 0000000..e21c7fa
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (relay, logging, reachability):
+    - When launching bandwidth testing circuit, don't log notice that we are
+      doing a reachability test. Furthermore, avoid to trigger a
+      "CHECKING_REACHABILITY" control event. Fixes bug 40205; bugfix on
+      0.4.5.1-alpha.
index b711c94eb61b59ce6d697837746d56c216fb2aa1..86b1533be15320e11254ced18271584c41c93613 100644 (file)
@@ -274,7 +274,12 @@ router_do_orport_reachability_checks(const routerinfo_t *me,
              !orport_reachable ? "reachability" : "bandwidth",
              family_name, fmt_addrport_ap(ap));
 
-    inform_testing_reachability(&ap->addr, ap->port, false);
+    if (!orport_reachable) {
+      /* Only log if we are actually doing a reachability test to learn if our
+       * ORPort is reachable. Else, this prints a log notice if we are simply
+       * opening a bandwidth testing circuit even do we are reachable. */
+      inform_testing_reachability(&ap->addr, ap->port, false);
+    }
 
     circuit_launch_by_extend_info(CIRCUIT_PURPOSE_TESTING, ei,
                                   CIRCLAUNCH_NEED_CAPACITY|