Tor Ipv6-Patch
Michael G. Reed
reed at inet.org
Tue Dec 4 12:58:04 UTC 2007
On Tue, 4 Dec 2007, Nick Mathewson wrote:
|> - You're right that the preferred way to store addresses that could be
|> either IPv4 or IPv6 is indeed with tor_addr_t. (Thanks for the
|> reminder, BTW: I fixed tor_addr_t to be a tagged union of in_addr and
|> in6_addr, not of sockaddr_in and sockaddr_in6.)
Not sure if it applies in this case or not (I'm looking at this
comment from 50,000 feet, not having looked at the actual usage/code),
but an in6_addr is insufficient to fully specify all IPv6 addresses
(it is fine for global-scope addresses, but cannot handle
link/site-scoped addresses -- if there is any chance of a scoped
address, you must use either a sockaddr_in6, or a in6_addr with
another field to specify the next hop interface either textually (if
external), or numerically (if in-system)). Since routers (in the
OSPFv3/RIPng sense that is) are encouraged to use link-local next
hops, you will see sockaddr_in6's prevalent in that sort of
development... Again, may not apply here, but thought I would throw
that out (I've done just a wee-bit of IPv6 router coding in the
not-so-distant past :).
-Michael
More information about the tor-dev
mailing list