Age | Commit message (Collapse) | Author |
|
Here we add a little bit of state to origin circuits, and set up
the necessary functions for the circuit code to call in order to
find guards, use guards, and decide when circuits can be used.
There's also an incomplete function for the hard part of the
circuit-maintenance code, where we figure out whether any waiting
guards are ready to become usable.
(This patch finally uses the handle.c code to make safe handles to
entry_guard_t objects, so that we are allowed to free an
entry_guard_t without checking whether any origin_circuit_t is
holding a reference to it.)
|
|
This code handles:
* Maintaining the sampled set, the filtered set, and the
usable_filtered set.
* Maintaining the confirmed and primary guard lists.
* Picking guards for circuits, and updating guard state when
circuit state changes.
Additionally, I've done code structure movement: even more constants
and structures from entrynodes.c have become ENTRYNODES_PRIVATE
fields of entrynodes.h.
I've also included a bunch of documentation and a bunch of unit
tests. Coverage on the new code is pretty high.
I've noted important things to resolve before this branch is done
with the /XXXX.*prop271/ regex.
|
|
These are taken from the proposal, and defined there. Some of them
should turn into consensus parameters.
Also, remove some dead code that was there to make compilation work,
and use ATTR_UNUSED like a normal person.
|
|
|
|
The previous commit, in moving a bunch of functions to bridges.c,
broke compilation because bridges.c required two entry points to
entrynodes.c it didn't have.
|
|
This patch is just:
* Code movement
* Adding headers here and there as needed
* Adding a bridges_free_all() with a call to it.
It breaks compilation, since the bridge code needed to make exactly
2 calls into entrynodes.c internals. I'll fix those in the next
commit.
|
|
The encoding code is very straightforward. The decoding code is a
bit tricky, but clean-ish. The sampling code is untested and
probably needs more work.
|
|
(We previously added support for generating the spaceless
2016-11-14T19:58:12 variant, but not for actually parsing it.)
|
|
|
|
|
|
This was a relatively mechanical change. First, I added an accessor
function for the pathbias-state field of a guard. Then I did a
search-and-replace in circpathbias.c to replace "guard->pb." with
"pb->". Finally, I made sure that "pb" was declared whenever it was
needed.
|
|
|
|
This function helpfully removes all but one remaining use of
an entry_guard_t private field in pathbias.c
|
|
(Other than the field movement, the code changes here are just
search-and-replace)
|
|
The entry_guard_t structure should really be opaque, so that we
can change its contents and have the rest of Tor not care.
This commit makes it "mostly opaque" -- circpathbias.c can still see
inside it. (I'm making circpathbias.c exempt since it's the only
part of Tor outside of entrynodes.c that made serious use of
entry_guard_t internals.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For relays that don't know their own address, avoid attempting
a local hostname resolve for each descriptor we download. Also cut
down on the number of "Success: chose address 'x.x.x.x'" log lines.
Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha.
|
|
no change in behavior except fewer log entries in the case where we use
a cached result.
|
|
This was bug 20630; bugfix on f3e158ed where I thought I was
committing a documentation-only fix but instead messed up the
control flow too.
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
|
|
|
|
Single onion services and Tor2web deliberately create long-term one-hop
circuits to their intro and rend points, respectively.
These log messages are intended to diagnose issue 8387, which relates to
circuits hanging around forever for no reason.
Fixes bug 20613; bugfix on 0.2.9.1-alpha. Reported by "pastly".
|
|
Refactoring, no behaviour change.
|
|
|
|
|
|
This field indicates if the service is a Single Onion Service if present in
the descriptor.
Closes #19642
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Lower exponents mean that delays do not vary as much. This helps test
networks bootstrap consistently.
Bugfix on 20499.
|
|
Conflicts:
src/or/rendservice.c
|
|
|
|
Fixes #20567
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
(Three _is_ a good number for anonymity!)
|
|
|
|
|
|
Because as Teor puts it: "[Resetting on 503] is exactly what we
don't want when relays are busy - imagine clients doing an automatic
reset every time they DoS a relay..."
Fixes bug 20593.
|
|
|
|
|
|
'teor/bug20591_029' and 'teor/bug20533_029' into maint-0.2.9
|
|
It's only safe to remove the failure limit (per 20536) if we are in
fact waiting a bit longer each time we try to download.
Fixes bug 20534; bugfix on 0.2.9.1-alpha.
|