diff options
author | George Kadianakis <desnacked@riseup.net> | 2020-06-02 14:01:49 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2020-06-02 14:01:49 +0300 |
commit | 22a26a273e8dc8de663722f96487ca22d4980121 (patch) | |
tree | 935b8f66ab00da98021135d1d46f892af697aa8c | |
parent | b6e60f26dd04fa4f2ae8020b4148147380b6d28b (diff) | |
parent | 39f2411b3f5ab1a50c74fdafb432d5286c451ab7 (diff) | |
download | tor-22a26a273e8dc8de663722f96487ca22d4980121.tar.gz tor-22a26a273e8dc8de663722f96487ca22d4980121.zip |
Merge branch 'tor-github/pr/1909'
-rw-r--r-- | changes/bug34303 | 5 | ||||
-rw-r--r-- | src/core/or/circuitlist.c | 2 | ||||
-rw-r--r-- | src/feature/client/entrynodes.c | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/changes/bug34303 b/changes/bug34303 new file mode 100644 index 0000000000..dce57f4646 --- /dev/null +++ b/changes/bug34303 @@ -0,0 +1,5 @@ + o Minor bugfixes (client performance): + - Resume being willing to use preemptively-built circuits when + UseEntryGuards is set to 0. We accidentally disabled this feature + with that config setting, leading to slower load times. Fixes bug + 34303; bugfix on 0.3.3.2-alpha. diff --git a/src/core/or/circuitlist.c b/src/core/or/circuitlist.c index 4c37ef8b41..90cce47490 100644 --- a/src/core/or/circuitlist.c +++ b/src/core/or/circuitlist.c @@ -1943,7 +1943,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 55cc22cf0c..ded7db969a 100644 --- a/src/feature/client/entrynodes.c +++ b/src/feature/client/entrynodes.c @@ -3454,10 +3454,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; } |