[tor-commits] [tor/master] Don't warn about absent guard state when none expected.

nickm at torproject.org nickm at torproject.org
Mon Dec 19 17:31:38 UTC 2016


commit c468df3961739720337baa6cc01da23aa8520712
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Dec 19 12:24:30 2016 -0500

    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.
---
 src/or/circuitbuild.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index a14a2b1..55929c1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -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);





More information about the tor-commits mailing list