Fix DNS not being accessible with slirp4netns on hosts with IPv6-only nameservers #438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
libslirp will provide DNS to the "guest side" simply by forwarding IPv4 UDP packets to the IPv4 host nameserver and idem for IPv6.
See https://gitlab.freedesktop.org/slirp/libslirp/-/blob/6ea2c4f95922a64d21190d9ad163e3bbde37a836/src/socket.c#L971
and https://gitlab.freedesktop.org/slirp/libslirp/-/blob/6ea2c4f95922a64d21190d9ad163e3bbde37a836/src/socket.c#L990
On a host with only IPv4 or IPv6 nameservers this will make only
10.0.2.3
orfd00::3
functional.This PR will fix DNS issues on hosts with only IPv6 DNS (such as on a network using NAT64 and DNS64 without client-side address translation) by advertising to the child process the Slirp IPv6 DNS address.