Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/dnscache: Handle 4-in-6 addresses in DNS responses
On Android, the system resolver can return IPv4 addresses as IPv6-mapped addresses (i.e. `::ffff:a.b.c.d`). After the switch to `net/netip` (19008a3), this case is no longer handled and a response like this will be seen as failure to resolve any IPv4 addresses. Handle this case by simply calling `Unmap()` on the returned IP when it is a 4-in-6 address. Fixes tailscale#5698. Signed-off-by: Peter Cai <peter@typeblog.net>
- Loading branch information