Fixed clashing embedded DNS with systemd-resolved#43705
Closed
excitoon wants to merge 2 commits intomoby:masterfrom
Closed
Fixed clashing embedded DNS with systemd-resolved#43705excitoon wants to merge 2 commits intomoby:masterfrom
systemd-resolved#43705excitoon wants to merge 2 commits intomoby:masterfrom
Conversation
Signed-off-by: Vladimir Chebotarev <vladimir.chebotarev@gmail.com>
thaJeztah
reviewed
Jun 7, 2022
|
|
||
| func isSystemdResolvedIPv4Loopback(ipAddress string) bool { | ||
| if ip := net.ParseIP(ipAddress); ip != nil { | ||
| if ip4 := ip.To4(); ip4 != nil { |
Member
There was a problem hiding this comment.
I'm curious, as the isIPv4Loopback() function already returns true for any IP address in the 127.x.x.x range; was this not detected?
Author
There was a problem hiding this comment.
Actually, I bypass checkLoopback there (which is false when Docker generates /etc/resolv.conf from settings): https://github.com/moby/moby/blob/master/libnetwork/sandbox_dns_unix.go#L268 .
Signed-off-by: Vladimir Chebotarev <vladimir.chebotarev@gmail.com>
Author
|
Hi @thaJeztah. Any progress on that? |
corhere
requested changes
Feb 10, 2023
Contributor
corhere
left a comment
There was a problem hiding this comment.
Special-casing the IP addresses 127.0.0.53 and .54 to always be external will break existing behaviour of the --dns flag.
moby/libnetwork/sandbox_dns_unix.go
Lines 258 to 261 in 3ba527d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes a bug with DNS resolving in some Linux environments given we specified some DNS options.
systemd-resolvedhas DNS with IP: 127.0.0.53:Docker fails to redirect DNS queries to that address given we touched some other DNS options and
/etc/resolv.conffile was rebuilt.Fixes docker/for-linux#1404