tor
tor copied to clipboard
hs-v3: Make service pick the exact amount of intro points
When encoding introduction points, we were not checking if that intro points had an established circuit.
When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor.
However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed.
But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet.
This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561).
Fixes #31548
Signed-off-by: David Goulet [email protected]
Pull Request Test Coverage Report for Build 6531
- 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
- 574 unchanged lines in 6 files lost coverage.
- Overall coverage increased (+0.0005%) to 60.288%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
src/feature/hs/hs_service.c | 0 | 2 | 0.0% |
<!-- | Total: | 0 | 2 |
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
src/feature/dirauth/shared_random.c | 3 | 85.64% |
src/feature/dirauth/dirvote.c | 9 | 64.79% |
src/app/config/confparse.c | 52 | 78.38% |
src/feature/nodelist/routerlist.c | 66 | 37.62% |
src/feature/client/entrynodes.c | 74 | 86.19% |
src/core/or/connection_edge.c | 370 | 26.73% |
<!-- | Total: | 574 |
Totals | |
---|---|
Change from base Build 5964: | 0.0005% |
Covered Lines: | 42873 |
Relevant Lines: | 71114 |