[tor-bugs] #15518 [Core Tor/Tor]: Tor considers routers in the same IPv6 /16 to be "in the same subnet"

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 4 06:36:19 UTC 2017


#15518: Tor considers routers in the same IPv6 /16 to be "in the same subnet"
-------------------------------------------------+-------------------------
 Reporter:  isis                                 |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  ipv6, path, path-bias, tor-client    |  Actual Points:
  easy                                           |
Parent ID:  #24393                               |         Points:  1
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 Here's how to fix this bug:
 * tor_addr_t has a `family` member, it can be `AF_INET` or `AF_INET6`.
 * if the addresses have different families, they are not "in the same
 subnet".
 * if the addresses are both IPv4, use the existing code to compare /16s.
 * if the addresses are both IPv6, add new code that compares /32s.

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


More information about the tor-bugs mailing list