diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/circuitlist.c | 2 | ||||
-rw-r--r-- | src/feature/client/entrynodes.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/core/or/circuitlist.c b/src/core/or/circuitlist.c index 61bcfa9039..4102cf3d4c 100644 --- a/src/core/or/circuitlist.c +++ b/src/core/or/circuitlist.c @@ -1938,7 +1938,7 @@ circuit_find_to_cannibalize(uint8_t purpose_to_produce, extend_info_t *info, } /* Ignore any circuits for which we can't use the Guard. It is possible - * that the Guard was removed from the samepled set after the circuit + * that the Guard was removed from the sampled set after the circuit * was created so avoid using it. */ if (!entry_guard_could_succeed(circ->guard_state)) { goto next; diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c index 537ead020b..115d871843 100644 --- a/src/feature/client/entrynodes.c +++ b/src/feature/client/entrynodes.c @@ -3452,10 +3452,16 @@ entry_guards_update_state(or_state_t *state) entry_guards_dirty = 0; } -/** Return true iff the circuit's guard can succeed that is can be used. */ +/** Return true iff the circuit's guard can succeed, that is, can be used. */ int entry_guard_could_succeed(const circuit_guard_state_t *guard_state) { + if (get_options()->UseEntryGuards == 0) { + /* we're fine with this circuit's first hop, because we're not + * configured to use entry guards. */ + return 1; + } + if (!guard_state) { return 0; } |