[tor-bugs] #21771 [Core Tor/Tor]: Cannot change bridge (with Tor 0.3.0.4-rc)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Mar 27 12:43:14 UTC 2017
#21771: Cannot change bridge (with Tor 0.3.0.4-rc)
---------------------------------+------------------------------------
Reporter: torvlnt33r | Owner: asn
Type: defect | Status: assigned
Priority: Very High | Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor | Version: Tor: 0.3.0.4-rc
Severity: Normal | Resolution:
Keywords: bridge 030-backport | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor:
---------------------------------+------------------------------------
Comment (by asn):
With Nick we discussed that the right fix is probably to implement the
original intention of the code snippet here:
{{{
get_max_sample_size(guard_selection_t *gs,
int n_guards)
{
...
/* With bridges, max_sample is "all of them" */
if (using_bridges)
return n_guards;
}}}
and actually make the max_sample size be "all of them" in the bridge case
instead of just being the number of bridges in torrc.
Possible implementations:
a) The obvious (but slightly dirty) way of doing this would be to change
`return n_guards` above to `return INT_MAX`. I verified that this would
fix the bug of this ticket.
b) If we want a nicer semantic than `INT_MAX` we could perhaps return the
number of bridges in our torrc ''plus'' the number of currently sampled
bridges.
c) The third alternative would be to return `DFLT_MAX_SAMPLE_SIZE` but
that would not actually fix all edge cases, since if our sampled guard
list contains lots of old bridges we could actually hit the limit.
Personally, I think going with (a) and a small comment describing the
logic is fine. Alternatively, we could go with (b) if we want to seem
smarter.
I can write a quick patch here after we decide on the approach.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21771#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list