[tor-bugs] #24392 [Core Tor/Tor]: Ignore cached bridge descriptors until we check if they are running
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Dec 10 15:39:28 UTC 2017
#24392: Ignore cached bridge descriptors until we check if they are running
-------------------------------------------------+-------------------------
Reporter: teor | Owner: nickm
Type: defect | Status:
| needs_review
Priority: Medium | Milestone: Tor:
| 0.3.2.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.3.2.1-alpha
Severity: Normal | Resolution:
Keywords: regression, tor-bridge-client, | Actual Points: 0.5
s8-errors, review-group-27 |
Parent ID: #24367 | Points: 0.3
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):
* status: needs_revision => needs_review
* actualpoints: 0.3 => 0.5
Comment:
Replying to [comment:5 arma]:
> I'm stuck in a maze of twisty little tickets, all being parents of each
other, but: in proposed commit 690f646bf:
>
> {{{
> diff --git a/src/or/circuituse.c b/src/or/circuituse.c
> index aa0df95..8c9859b 100644
> --- a/src/or/circuituse.c
> +++ b/src/or/circuituse.c
> @@ -2084,7 +2084,7 @@ circuit_get_open_circ_or_launch(entry_connection_t
*conn,
> "used client functionality lately" :
> "received a consensus with exits",
> options->UseBridges ? "bridges" : "entrynodes");
> - } else if (!options->UseBridges ||
any_bridge_descriptors_known()) {
> + } else if (!options->UseBridges || num_bridges_usable() > 0) {
> log_fn(severity, LD_APP|LD_DIR,
> "Application request when we haven't %s. "
> "Optimistically trying directory fetches again.",
> }}}
>
> teor, did you check that you didn't break this functionality? We have
broken it several times in the past and taken years to notice.
You'll love this one, arma.
It is impossible to break this functionality by changing that condition,
because !options->UseBridges is always true at this point in the code.
For an explanation, see the commit message on:
{{{
[bug24367_032 e9cb0cd7c8] Simplify some conditionals in
circuit_get_open_circ_or_launch()
}}}
I also added a flag to num_bridges_usable() that lets us count "definitely
reachable" and "maybe reachable or definitely reachable" bridges. I think
that deals with some of the issues in #24367:
{{{
[bug24367_032 bca43d548a] Make sure bridges are definitely running before
delaying directory fetches
}}}
We might still be missing a call to download_status_reset() somewhere, but
I had a quick look, and it seemed ok.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24392#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list