[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
Wed Dec 6 16:33:17 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):
The current code in addrs_in_same_network_family() calls
tor_addr_compare_masked() to compare all addresses by /16.
You need to add more calls to tor_addr_compare_masked() in
addrs_in_same_network_family() so that:
* if the family of a1 is AF_INET, it uses /16 for IPv4
* if the family of a1 is AF_INET6 and tor_addr_is_v4(a1), it uses /112 for
an IPv6-mapped IPv4 address (96 bits for the v4 map and 16 for IPv6)
* otherwise, it is native IPv6, and it uses /32.
I realise this is a change from what I said above, I just read
tor_addr_compare_masked() and it's more complicated than I thought.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15518#comment:27>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list