tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 1d6470a2a83ca6bab8c52bcff5d0969b1866a4df
parent b733f9d6ace63c710bc4b567627500cfbeb1592d
Author: David Goulet <dgoulet@torproject.org>
Date:   Wed, 15 Jun 2022 12:25:46 -0400

Merge branch 'maint-0.4.7'

Diffstat:
Achanges/bug40603 | 5+++++
Achanges/bug40612 | 5+++++
Msrc/core/or/circuitbuild.c | 18++++++++++++++----
3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/changes/bug40603 b/changes/bug40603 @@ -0,0 +1,5 @@ + o Minor bugfixes (logging): + - Demote a harmless warn log message about finding a second hop to from + warn level to info level, if we do not have enough descriptors yet. + Leave it at notice level for other cases. Fixes bug 40603; + bugfix on 0.4.7.1-alpha. diff --git a/changes/bug40612 b/changes/bug40612 @@ -0,0 +1,5 @@ + o Minor bugfixes (logging): + - Demote a notice log message about "Unexpected path length" to info + level. These cases seem to happen arbitrarily, and we likely will + never find all of them before the switch to arti. Fixes bug 40612; + bugfix on 0.4.7.5-alpha. diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c @@ -1289,8 +1289,7 @@ circuit_finish_handshake(origin_circuit_t *circ, * don't seem able to do it, so there is some magic way that hops can * still get added. Perhaps some cases of circuit pre-build that change * purpose? */ - static ratelim_t cc_path_limit = RATELIM_INIT(600); - log_fn_ratelim(&cc_path_limit, LOG_NOTICE, LD_CIRC, + log_info(LD_CIRC, "Unexpected path length %d for exit circuit %d, purpose %d", circ_len, circ->global_identifier, TO_CIRCUIT(circ)->purpose); @@ -2520,8 +2519,19 @@ onion_extend_cpath(origin_circuit_t *circ) } if (!info) { - log_warn(LD_CIRC,"Failed to find node for hop #%d of our path. Discarding " - "this circuit.", cur_len+1); + /* This can happen on first startup, possibly due to insufficient relays + * downloaded to pick vanguards-lite layer2 nodes, or other ephemeral + * reasons. It only happens briefly, is hard to reproduce, and then goes + * away for ever. :/ */ + if (!router_have_minimum_dir_info()) { + log_info(LD_CIRC, + "Failed to find node for hop #%d of our path. Discarding " + "this circuit.", cur_len+1); + } else { + log_notice(LD_CIRC, + "Failed to find node for hop #%d of our path. Discarding " + "this circuit.", cur_len+1); + } return -1; }