Should we turn resolve_my_address() into resolve_my_addresses() and
teach it about IPv6? get_interface_address6() used here needs some
work for #4806 (moved) too.
A few thoughts:
resolve_my_address() looks at options->Address. What should
'Address' mean now that a relay doesn't have one single address any
more?
get_interface_address() says "This address should only be used in
checking whether our address has changed" but is actually used by
resolve_my_address() in the case where we fail to resolve our
hostname. Does get_interface_address6() need more work or should we
just add a comment to where we use it in a non-recommended way?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Since all the *port options allow Address to be overridden, I'm inclined to keep the current meaning of Address. When we resolve it, though, let's remember if it has any INET6 addresses in addition to its INET addresses, and use those as an appropriate fallback when finding our IPv6 address.
I think the right fix for the comment on get_interface_address() is to explain why it can tell you that the address has changed, but it's only a good guess for our current public address (that is, because NAT exists).
As of 0.2.7.3-rc, we also use get_interface_address6* to discover our IPv4 and IPv6 addresses so we can block them in the exit policy (#17027 (moved)).
Relays also allow IPv6 ORPorts to be set, and the first IPv6 ORPort is used as the ipv6_addr for the relay.
Perhaps we need an option to tell relays it's ok to autodetect their IPv6 address?
IPv6Relay?
If it's an AUTOBOOL, we could change the default in the consensus from 0 to 1 once enough relays have upgraded, and once we check IPv6 reachability from the relay itself, and the authorities, and maybe the bwauths.
In #17281 (moved), I intend to use get_interface_address6* to determine whether the client has any non-local IPv6 address(es). That gets us halfway to fixing this issue.
When tor can figure out its own IPv6 address, a relay configured with ORPort [::]:443 should put the discovered IPv6 address in its descriptor. (See #18387 (moved).)
If we turned on IPv6 autodetection by default, operators with broken IPv6 configs might find their relays being excluded from the consensus because they are unreachable on IPv6.
We'd have to teach Tor to test IPv6 reachability, and stop advertising IPv6 if it was unreachable.
But this is counted as an address change by OnionOO, so it has flow-on effects in systems that analyse relay stability.
And there are race conditions involved - this is why we made IPv4 DirPort reachability a requirement in 0.2.8 in #18050 (moved).