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

[Tor Trac #34065]: Make routerset_contains_router() support IPv6 #1931

Closed
wants to merge 6 commits into from

Conversation

Labels
None yet
Projects
None yet
4 participants
@neelchauhan
Copy link
Contributor

@neelchauhan neelchauhan commented Jun 11, 2020

PR: https://trac.torproject.org/projects/tor/ticket/34065

@coveralls
Copy link

@coveralls coveralls commented Jun 11, 2020

Pull Request Test Coverage Report for Build 9181

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1203 unchanged lines in 8 files lost coverage.
  • Overall coverage decreased (-0.02%) to 64.321%

Files with Coverage Reduction New Missed Lines %
src/feature/dirauth/shared_random.c 4 85.0%
src/feature/dirparse/ns_parse.c 6 68.43%
src/feature/dirauth/dirvote.c 10 65.36%
src/feature/relay/circuitbuild_relay.c 17 89.57%
src/core/or/circuitstats.c 103 77.25%
src/lib/sandbox/sandbox.c 291 1.4%
src/feature/control/control_events.c 351 42.17%
src/feature/control/control_cmd.c 421 27.06%
Totals Coverage Status
Change from base Build 9131: -0.02%
Covered Lines: 51158
Relevant Lines: 79536

💛 - Coveralls

@neelchauhan neelchauhan force-pushed the bug34065 branch 2 times, most recently from e0a423f to 1e0a36f Jun 17, 2020
src/feature/nodelist/routerset.c Outdated Show resolved Hide resolved
routerset_contains(set, &addr_v4, ri->or_port, ri->nickname,
ri->cache_info.identity_digest, country);
int v6_ret =
routerset_contains(set, &ri->ipv6_addr, ri->ipv6_orport, ri->nickname,
Copy link
Contributor

@nmathewson nmathewson Jun 22, 2020

  1. Doing these two separate checks means that routerset_contains_router will check the nickname and identity twice. That's wasted computation that can add up. It would be better to arrange things so that those only get checked once.

@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