Trac: Summary: launch_one_resolve should always resolve AAAA records, regardless of IPv6Exit to launch_resolve() should always resolve AAAA records, regardless of IPv6Exit
The underlying bug is that exit relays are returning REASON_RESOLVEFAILED for resolve attempts to addresses like ipv6.google.com, which causes clients to get no hints about which exits might be able to reach that address successfully. If the exit relay would do the AAAA resolve, then it could usefully respond with REASON_EXITPOLICY, and include the v6 address in the end cell, and then clients could try again on a circuit that has explicit v6 exit support.
I think we shouldn't worry about whether exits meant to allow v6 lookups -- if you're an exit relay and you're willing to do v4 resolves, then I think it's a legit assumption that you're willing to do v6 resolves too.
One question that makes me pause though: are there dns resolvers out there that quietly drop AAAA resolve requests, which would cause surprising timeouts on exits while they wait for both resolve responses?
Is the fix just to remove the two "if IPv6Exit" checks from launch_resolve()?
Then we always launch both, and even if the dns resolver is somehow totally broken wrt v6 answers, cached_resolve_add_answer() would just dutifully note the failure of the v6 resolve, and things would all work?
(I thought briefly about whether we should only launch the v6 resolve attempt if the stream that triggers our resolve would be interested in a v6 answer. But since this cached resolve answer is meant to be used for multiple streams, meaning potentially multiple clients, and we probably don't want to introduce a side channel about what sort of request showed up last time for this address, that seems like a poor idea.)
Trac: Summary: launch_resolve() should always resolve AAAA records, regardless of IPv6Exit to Exits should resolve IPv6 addresses, regardless of IPv6Exit Description: That way, clients find out if the hostname they're trying to reach is IPv6-only, and can try an IPv6 exit next time.
to
That way, clients find out if the hostname they're trying to reach is IPv6-only, and can try an IPv6 exit next time.
Was: launch_resolve() should always resolve AAAA records, regardless of IPv6Exit
Note that we're changing behavior from before, where before we would only consider launching the v6 resolve if creating the v4 resolve succeeded. Now we're launching the v6 resolve even if something went wrong while setting up the v4 resolve.
This choice is fine with me, but whoever made the original choice (was that Nick?) should see it and consider it too.
Patch looks good! But it needs #21310 (moved) to get resolved before it can be the right patch.
Have you tested it?
That was my plan over the weekend, but it didn't end up happening.
I think it needs a tor network with 1 IPv6 exit and 7 IPv4 exits to match the current proportions in the public network. We should get a 100% success rate for ipv6.google.com with this patch, and ~12.5% - ~37.5% without it. (Clients on the public network should have a success rate of 3 * 12.5%, but they actually have a success rate around ~10%. I wonder if there are a lot of non-functional IPv6 exits out there?)
Putting in needs_information until it's been tested.