aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-09-18 10:03:57 -0400
committerNick Mathewson <nickm@torproject.org>2020-09-18 10:03:57 -0400
commit781ab9eea49b07b1925d7d8dcbad06348896344e (patch)
tree6a5ec10c59617467e25863fb911689625f2467dd /src/feature
parent404c224c711714f014288c79257c4bfd3880905c (diff)
downloadtor-781ab9eea49b07b1925d7d8dcbad06348896344e.tar.gz
tor-781ab9eea49b07b1925d7d8dcbad06348896344e.zip
Add flag for whether an OR conn "counts" for bootstrap tracking
We set this flag if we've launched the connection in order to satisfy an origin circuit, or when we decide the connection _would_ satisfy an origin circuit. These are the only or_connections we want to consider for bootstrapping: other or_connections are opened because of client EXTEND requests, and they may succeed or fail because of the clients' confusion or misconfiguration. Closes #25061.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/control/control_bootstrap.c3
-rw-r--r--src/feature/relay/circuitbuild_relay.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/control/control_bootstrap.c b/src/feature/control/control_bootstrap.c
index d4f2adde81..cca2a81b1f 100644
--- a/src/feature/control/control_bootstrap.c
+++ b/src/feature/control/control_bootstrap.c
@@ -348,6 +348,9 @@ control_event_bootstrap_prob_or, (const char *warn, int reason,
{
int dowarn = 0;
+ if (! or_conn->potentially_used_for_bootstrapping)
+ return;
+
if (or_conn->have_noted_bootstrap_problem)
return;
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c
index 64f3c341ae..289a5be557 100644
--- a/src/feature/relay/circuitbuild_relay.c
+++ b/src/feature/relay/circuitbuild_relay.c
@@ -475,6 +475,7 @@ circuit_extend(struct cell_t *cell, struct circuit_t *circ)
&ec.ed_pubkey,
ipv4_valid ? &ec.orport_ipv4.addr : NULL,
ipv6_valid ? &ec.orport_ipv6.addr : NULL,
+ false,
&msg,
&should_launch);