[tor-bugs] #33618 [Core Tor/Tor]: Add IPv6 Support to is_local_addr()
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Mar 20 11:46:37 UTC 2020
#33618: Add IPv6 Support to is_local_addr()
------------------------------------------+--------------------------------
Reporter: kimimaro | Owner: kimimaro
Type: enhancement | Status: assigned
Priority: Medium | Milestone: Tor:
| 0.4.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: outreachy-ipv6 ipv6 prop312 | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor: Sponsor55-can
------------------------------------------+--------------------------------
Comment (by teor):
Replying to [comment:8 MrSquanchee]:
> If I may help, I can see that `tor_addr_is_valid(const tor_addr_t *addr,
int for_listening)` does not check for ipv6 addresses here:
[https://github.com/torproject/tor/blob/686494f0f71b9235399b8241aba3e0c2fcb03ea1/src/lib/net/address.c#L831].
That's true, but we should open another ticket to fix the issue with
tor_addr_is_valid(). Because that issue is not relevant to this ticket.
Here's why:
It doesn't make any sense to compare an all-zeroes IPv6 address to see if
it's on the same network as another address. So we should pass "false" for
"for_listening".
And all-zeroes addresses never reach this code, because they are excluded
by tor_addr_is_internal() at the start of the function.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33618#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list