diff options
author | Roger Dingledine <arma@torproject.org> | 2020-05-30 01:54:22 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2020-05-30 02:20:48 -0400 |
commit | 39f2411b3f5ab1a50c74fdafb432d5286c451ab7 (patch) | |
tree | e8bddd28da64521ad8656ef2b61fb7ded7738c70 /src/feature | |
parent | a59d54756f9b369fefdc7ca84c432d8873264f42 (diff) | |
download | tor-39f2411b3f5ab1a50c74fdafb432d5286c451ab7.tar.gz tor-39f2411b3f5ab1a50c74fdafb432d5286c451ab7.zip |
Preemptive circs should work with UseEntryGuards 0
Resume being willing to use preemptively-built circuits when
UseEntryGuards is set to 0. We accidentally disabled this feature with
that config setting (in our fix for #24469), leading to slower load times.
Fixes bug 34303; bugfix on 0.3.3.2-alpha.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/client/entrynodes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c index 7c2159ce84..8d9230b66b 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; } |