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

hs-v3: Remove intro point on circuit build time out #1275

Closed
wants to merge 7 commits into from

Conversation

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

@dgoulet-tor dgoulet-tor commented Aug 29, 2019

When establishing service intro points, if a circuit ever times out due to
CBT, callback into the HS subsystem in order to remove the intro point from
the service descriptor list.

Fixese #31561

Signed-off-by: David Goulet dgoulet@torproject.org

When establishing service intro points, if a circuit ever times out due to
CBT, callback into the HS subsystem in order to remove the intro point from
the service descriptor list.

Fixese #31561

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

@coveralls coveralls commented Aug 30, 2019

Pull Request Test Coverage Report for Build 6571

  • 29 of 33 (87.88%) changed or added relevant lines in 2 files are covered.
  • 3496 unchanged lines in 31 files lost coverage.
  • Overall coverage increased (+0.4%) to 63.389%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuituse.c 11 12 91.67%
src/feature/hs/hs_service.c 18 21 85.71%
Files with Coverage Reduction New Missed Lines %
src/core/or/circuitbuild.c 2 39.9%
src/core/or/versions.c 2 94.53%
src/feature/client/entrynodes.c 2 86.25%
src/lib/buf/buffers.c 2 91.03%
src/lib/confmgt/structvar.c 2 96.72%
src/feature/hs/hs_dos.c 3 93.33%
src/feature/nodelist/routerset.c 3 94.63%
src/feature/dirparse/microdesc_parse.c 4 96.9%
src/lib/malloc/map_anon.c 7 81.08%
src/lib/err/torerr.c 12 82.93%
Totals Coverage Status
Change from base Build 6046: 0.4%
Covered Lines: 48022
Relevant Lines: 75758

💛 - Coveralls

src/feature/hs/hs_service.c Outdated Show resolved Hide resolved
src/feature/hs/hs_service.c Outdated Show resolved Hide resolved
src/core/or/circuituse.c Outdated Show resolved Hide resolved
src/feature/hs/hs_service.c Outdated Show resolved Hide resolved
dgoulet-tor added 4 commits Sep 4, 2019
Split the function into a client and service component so then those new
functions can be used for more specific purposes.

Part of #31561

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
@dgoulet-tor dgoulet-tor force-pushed the ticket31561_042_01 branch from ce79052 to e55235f Sep 4, 2019
static int
circuit_purpose_is_hs_client(uint8_t purpose)
{
/* Client-side purpose */
Copy link
Member

@asn-d6 asn-d6 Sep 4, 2019

Hmm, the split is not entirely true because vanguards also can be used for clients. There is no error introduced by this commit, but there is a semantic issue. I don't have a strong opinion on how to resolve this.

Copy link
Contributor Author

@dgoulet-tor dgoulet-tor Oct 3, 2019

What should I do here hehe? I'm not sure. The circuit_purpose_is_hs_service() does look for vanguard also. If is_hs_client() can also return true for the Vanguard purpose, we have a problem since both would return true?...

Want me to add a comment saying ?

Copy link
Member

@asn-d6 asn-d6 Oct 8, 2019

Hmm, how about we return True in is_hs_clietn() for vanguard circuits, so that in the future if someone uses it, we have taken it into account (and maybe also add it in the func docs)?

Do you think there will be a problem because they both would return true? Why?

Copy link
Contributor Author

@dgoulet-tor dgoulet-tor Oct 8, 2019

Unsure if I think there is a problem. I guess if the circuit is an HS Vanguard purpose, then it doesn't matter if both return True since all we want to know is if "it is HS" since these function are primarily used in circuit_purpose_is_hidden_service().

Fixup commit has the fix: ec801f4

@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