diff options
author | Roger Dingledine <arma@torproject.org> | 2021-10-26 05:40:38 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2021-11-08 05:37:02 -0500 |
commit | 5ad126a51bdfaeecc81b1cb6517abd2d5e039fad (patch) | |
tree | b8d496e3c7c3584f2a112232230cc1a564700cad /src | |
parent | 89ba63a6197ca8066ee64a5d7ac53fd5f5628918 (diff) | |
download | tor-5ad126a51bdfaeecc81b1cb6517abd2d5e039fad.tar.gz tor-5ad126a51bdfaeecc81b1cb6517abd2d5e039fad.zip |
don't cache connect failures from our own circuits
The connect failure cache had a bad interaction with retrying connections
to our guards or bridges when we go offline and then come back online --
while offline we would fail to connect and cache this result, and then
when we return we would decline to even attempt to connect, because our
failure cache said it wouldn't work.
Now only cache connect failures for relays when we connected to them
because of somebody else's EXTEND request.
Fixes bug 40499; bugfix on 0.3.3.4-alpha.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/connection_or.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index db9f93e6f6..0018b1dfd8 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -1316,6 +1316,13 @@ note_or_connect_failed(const or_connection_t *or_conn) tor_assert(or_conn); + if (or_conn->potentially_used_for_bootstrapping) { + /* Don't cache connection failures for connections we initiated ourself. + * If these direct connections fail, we're supposed to recognize that + * the destination is down and stop trying. See ticket 40499. */ + return; + } + ocf = or_connect_failure_find(or_conn); if (ocf == NULL) { ocf = or_connect_failure_new(or_conn); |