[PATCH] fwd: Drop implicit fallbacks to host loopback resolver
If a DNS forward option is (maybe mistakenly) passed for an IP
version that doesn't have a matching host-side resolver configured,
we currently fall back to translating the destination of DNS queries
to 0.0.0.0 / ::. This was intended as fallback, at least for IPv6.
The IPv6 version was there almost from the beginning (and then
refactored several times) as a convenient workaround for Podman
containers where the container's resolv.conf did *not* include an IPv6
resolver, even though they were running on a system where
systemd-resolved would offer DNS resolution over IPv6 on the host.
However, checking against a recent version of Podman, this doesn't
seem to be the case anymore, and moby / rootlesskit never had this
issue anyway, so it can go away at this point.
I'm not sure if the IPv4 version was ever needed. It might have
hidden some setup issues at some point, but I can't reproduce anything
like that with Podman right now.
In any case, this might be confusing for users, as Dan reported, and
doesn't seem to serve any practical purpose anymore,
Drop the fallbacks: if no host-side resolver is configured for a given
IP version, don't apply any special NAT, even if we see a DNS query
with a destination address matching a --dns-forward option for that
IP version.
Reported-by: Daniel Worthington-Bodart
participants (1)
-
Stefano Brivio