Skip to content
Snippets Groups Projects
Commit c468df39 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Don't warn about absent guard state when none expected.

Self-testing circuits don't use guards, and nobody uses guards when
UseEntryGuards is disabled.

Fixes bug 21007; bug not in any released Tor.
parent 271bfc92
No related branches found
No related tags found
No related merge requests found
......@@ -971,7 +971,9 @@ circuit_send_next_onion_skin(origin_circuit_t *circ)
// The circuit is usable; we already marked the guard as okay.
r = GUARD_USABLE_NOW;
} else if (! circ->guard_state) {
if (circuit_get_cpath_len(circ) != 1) {
if (circuit_get_cpath_len(circ) != 1 &&
circ->base_.purpose != CIRCUIT_PURPOSE_TESTING &&
get_options()->UseEntryGuards) {
log_warn(LD_BUG, "%d-hop circuit %p with purpose %d has no "
"guard state",
circuit_get_cpath_len(circ), circ, circ->base_.purpose);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment