Skip to content

Commit

Permalink
Merge branch 'tor-github/pr/1909' into maint-0.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ahf committed Jun 30, 2020
2 parents 8444fbe + 39f2411 commit 8697205
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changes/bug34303
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/core/or/circuitlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,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;
Expand Down
8 changes: 7 additions & 1 deletion src/feature/client/entrynodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8697205

Please sign in to comment.