Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not forward DNS requests to self. #47744

Merged
merged 1 commit into from May 7, 2024

Conversation

robmry
Copy link
Contributor

@robmry robmry commented Apr 23, 2024

- What I did

Make it safe to supply the internal DNS server's own address as an external DNS server.

Fix #47716

- How I did it

The internal resolver removes its own address from the list of ext-servers it's given, and logs a message.

- How to verify it

New integration test.

- Description for the changelog

When the internal DNS server's own address is supplied as an external server address, ignore it to avoid unproductive recursion.

@robmry robmry self-assigned this Apr 23, 2024
@robmry robmry added this to the 27.0.0 milestone Apr 23, 2024
@robmry robmry force-pushed the 47716_no_dns_req_to_self branch 2 times, most recently from 57ed10d to 8450910 Compare April 23, 2024 17:20
@robmry robmry marked this pull request as ready for review April 23, 2024 18:07
libnetwork/resolver.go Outdated Show resolved Hide resolved
If a container is configured with the internal DNS resolver's own
address as an external server, try the next ext server rather than
recursing (return SERVFAIL if there are no other servers).

Signed-off-by: Rob Murray <rob.murray@docker.com>
@akerouanton akerouanton merged commit 4d525c9 into moby:master May 7, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants