[tor-bugs] #7478 [Core Tor/Tor]: Allow routersets to include/exclude nodes by IPv6 address

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon May 23 16:50:44 UTC 2016

#7478: Allow routersets to include/exclude nodes by IPv6 address
 Reporter:  nickm                                |          Owner:  teor
     Type:  enhancement                          |         Status:
 Priority:  High                                 |  needs_review
Component:  Core Tor/Tor                         |      Milestone:  Tor:
 Severity:  Normal                               |  0.2.9.x-final
 Keywords:  tor-client, ipv6,                    |        Version:
  TorCoreTeam201605, TorCoreTeam-                |     Resolution:
  postponed-201604, review-group-2               |  Actual Points:
Parent ID:                                       |         Points:  1
 Reviewer:  mikeperry                            |        Sponsor:

Comment (by andrea):

 Begin review of branch at https://github.com/fergus-


  - I believe this code is correct, but I'd feel better about it if it made
    routerset_contains_router() call routerset_contains() twice and || the
    results rather than adding a second addr/orport to
    for the sake of keeping interfaces clean.  This approach will
    much more cleanly if we ever have cases where routers have more than
    addresses to check as well.


  - New unit tests for routerset_contains(); looks okay.


  - This just renames some parameters


  - Adds null checks to routerset_contains().  This is important given the
    new interface to make it possible to disable checking one set of args,
    but I really prefer keeping routerset_contains() clean and calling
    times when there's more than one address to check.


  - Unit test fixups after 9c4a7c174955666240dfa9605d9e5ffa64a2dbc0

 End code review

 Summary: I think this patch will work but I don't really like crufting up
 routerset_contains() this way - but I also don't have a totally good feel
 about routerset_contains() in general.  Perhaps we should have a simpler
 routerset_contains_addr() or something like that for clarity, since we
 other queries against a routerset like routerset_contains_router().

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7478#comment:37>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tor-bugs mailing list