Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket32020 043 02 #1554

Closed
wants to merge 15 commits into from
Closed

Conversation

Labels
None yet
Projects
None yet
4 participants
@dgoulet-tor
Copy link
Contributor

@dgoulet-tor dgoulet-tor commented Nov 20, 2019

No description provided.

dgoulet-tor added 8 commits Nov 20, 2019
Functions to correctly identify HS circuit type and version.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
Refactor to decomplexify circuit_about_to_free() and finally have one single
entry point into the HS subsystems (v2 and v3) for when a circuit is freed.

With this, hs_circ_cleanup() becomes the one and only entry point when a
circuit is freed which then routes to the right subsystem version for any
actions to be taken.

This moves a big chunk of code from circuituse.c to rendclient.c. No behavior
change. Next commit will refactor it to reduce our technical debt.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
Old and messy code path. Structure it in a more pleasant and readable way. No
behavior change with this refactor.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
Report back to the v3 subsystem any introduction point client circuit failure
so they can be noted down in the failure cache.

Fixes #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
By centralizing the circuit cleanup type that is: on close, free and
repurpose, some actions on the circuit can not happen for a certain cleanup
type or for all types.

This passes a cleanup type so the HS subsystem (v2 and v3) can take actions
based on the type of cleanup.

For instance, there is slow code that we do not run on a circuit close but
rather only on free.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
Since the removal of ip->circuit_established, this function does litterally
nothing so clean it up.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
@coveralls
Copy link

@coveralls coveralls commented Nov 20, 2019

Pull Request Test Coverage Report for Build 7334

  • 73 of 88 (82.95%) changed or added relevant lines in 5 files are covered.
  • 694 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.4%) to 62.949%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuituse.c 16 17 94.12%
src/feature/hs/hs_circuit.c 18 20 90.0%
src/feature/rend/rendclient.c 12 24 50.0%
Files with Coverage Reduction New Missed Lines %
src/feature/hs/hs_circuit.c 2 42.52%
src/feature/control/control_events.c 204 38.96%
src/app/config/config.c 488 79.71%
Totals Coverage Status
Change from base Build 7279: 0.4%
Covered Lines: 49424
Relevant Lines: 78514

💛 - Coveralls

src/feature/hs/hs_circuit.c Outdated Show resolved Hide resolved
changes/ticket32020 Show resolved Hide resolved
dgoulet-tor added 7 commits Nov 26, 2019
No need to look at the hs_token, the hs_circuitmap_remove_circuit() function
does it for us.

Part of #32020

Signed-off-by: David Goulet <dgoulet@torproject.org>
This reverts commit 031e35b.

Too many tests do not have "the_hs_circuitmap" initialized.

Signed-off-by: David Goulet <dgoulet@torproject.org>
@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment