There's really no difference between "I can't reach IPv6" and "ClientUseIPv6 0". Let's make them redundant. Let's also add an "I can't reach IPv4" option.
Which might be difficult to do without breaking existing configs, but I think we can fix that by:
Make ClientUseIPv6 1 append "accept [::]/0" to Reachable*Addresses
"For backwards-compatibility with IPv4-only ReachableAddresses policies, when ClientUseIPv6 is set to 1, ReachableAddresses will consider all IPv6 addresses reachable by default. End Reachable*Addresses with "reject :" to only allow explicitly specified IPv6 addresses."
Is it worth (for the time being) issuing a warning if the client only supports IPv6?
How much of the current guard pool only supports either protocol version?
Is it worth (for the time being) issuing a warning if the client only supports IPv6?
How much of the current guard pool only supports either protocol version?
It turns out that the majority of this ticket can be implemented by checking ClientUseIPv4 and ClientUseIPv6 when checking the fascist firewall settings for OR and Dir connections. This is implemented in #17840 (moved).
We don't even need to switch between IPv4 and IPv6 on dual-stack hosts. The random node selection already does that for us - in proportion to the IPv4/IPv6 consensus weight ratio.
(Which is a desirable property.)
This ticket might be able to be closed after testing #17840 (moved) to see if it makes connections on the wrong address family.
* Make ClientUseIPv6 1 append "accept [::]/0" to Reachable*Addresses * "For backwards-compatibility with IPv4-only Reachable*Addresses policies, when ClientUseIPv6 is set to 1, Reachable*Addresses will consider all IPv6 addresses reachable by default. End Reachable*Addresses with "reject *:*" to only allow explicitly specified IPv6 addresses."
* Make ClientUseIPv6 1 append "accept [::]/0" to Reachable*Addresses * "For backwards-compatibility with IPv4-only Reachable*Addresses policies, when ClientUseIPv6 is set to 1, Reachable*Addresses will consider all IPv6 addresses reachable by default. End Reachable*Addresses with "reject *:*" to only allow explicitly specified IPv6 addresses."
Oops, this still needs to be done.
It turns out my current code is sufficient, as the default fascist firewall policy action is ADDR_POLICY_ACCEPTED. See #9067 (moved) for details.
This ticket can close when #17840 (moved) has been thoroughly tested to see if it uses the wrong address family.
* Make ClientUseIPv6 1 append "accept [::]/0" to Reachable*Addresses * "For backwards-compatibility with IPv4-only Reachable*Addresses policies, when ClientUseIPv6 is set to 1, Reachable*Addresses will consider all IPv6 addresses reachable by default. End Reachable*Addresses with "reject *:*" to only allow explicitly specified IPv6 addresses."
It turns out my current code is sufficient, as the default fascist firewall policy action is ADDR_POLICY_ACCEPTED. See #9067 (moved) for details.
Ugh, options_validate() appends reject :. If ClientIPv6 is set and Reachable*Addresses looks IPv4-only, I'll warn the user. (See #9067 (moved).)
This ticket can close when #17840 (moved) has been thoroughly tested to see if it ever uses IPv4/6 when ClientUseIPv4/6 0 is set.
We resolved this in #17840 (moved) by redesigning the fascist_firewall API to check and choose addresses, taking ClientUseIPv[46] into account.
We also log an info if Tor ever makes a connection that violates IP family preferences, and log a warning and stack trace if tor ever uses a disabled IP family. See connection_connect_log_client_use_ip_version().
See my branch feature17840-v11-squashed in #17840 (moved).
Trac: Status: accepted to closed Resolution: N/Ato fixed