aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-24 14:50:42 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-24 14:50:42 -0400
commit2299b31f405e01abefa28924d86634b386949377 (patch)
tree718115e94413ab7519cca5929a5c8221058e2ec3 /src/core/or/circuituse.c
parent9d922b8eaae542429e1a12d82a43883b3be69acf (diff)
downloadtor-2299b31f405e01abefa28924d86634b386949377.tar.gz
tor-2299b31f405e01abefa28924d86634b386949377.zip
Don't let a bad IPv6 orport stop our IPv4 bandwidth test.
Specifically: do not close IPv4 bandwidth-testing circuits just because our IPv6 orport is unreachable. Attempted fix for #40068.
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 3c8a7c4a89..df23c63cff 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1651,11 +1651,12 @@ static void
circuit_testing_opened(origin_circuit_t *circ)
{
if (have_performed_bandwidth_test ||
- !router_all_orports_seem_reachable(get_options())) {
+ !router_orport_seems_reachable(get_options(), AF_INET)) {
/* either we've already done everything we want with testing circuits,
- * or this testing circuit became open due to a fluke, e.g. we picked
- * a last hop where we already had the connection open due to an
- * outgoing local circuit. */
+ * OR this IPv4 testing circuit became open due to a fluke, e.g. we picked
+ * a last hop where we already had the connection open due to a
+ * outgoing local circuit, OR this is an IPv6 self-test circuit, not
+ * a bandwidth test circuit. */
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_AT_ORIGIN);
} else if (circuit_enough_testing_circs()) {
router_perform_bandwidth_test(NUM_PARALLEL_TESTING_CIRCS, time(NULL));