Skip to content

fix: handle all IPv4 loopback resolvers - #9569

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
immanuwell:fix-worker-loopback-resolvconf
May 11, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
immanuwell:fix-worker-loopback-resolvconf

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Small follow-up to #9565. The parser already drops any 127.x.x.x nameserver from container resolv.conf, but the fallback check only noticed 127.0.0.x. So 127.1.2.3 got dropped and then... no nameserver. tiny DNS papercut, imo.

Repro, before this patch:

go test ./worker/runtime -run TestParseHostResolveConf_FallsBackToLocalIPForAnyIPv4LoopbackNameserver -count=1

It failed with actual: []string(nil), because fallback never kicked in.

Fix is just making the loopback detector match the same IPv4 loopback range the parser already filters: 127.0.0.0/8.

Checked:

go test ./worker/runtime -count=1
git diff origin/master...HEAD --check

@immanuwell
immanuwell requested a review from a team May 11, 2026 15:24
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 11, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: immanuwell / name: immanuwell (89ae1cf)

@Kump3r Kump3r left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thanks I missed this as I was focused on 127.0.0.1 and it was this way in the past implementation as well. Didn’t consider the alternative.

@Kump3r Kump3r added the bug label May 11, 2026
@taylorsilva
taylorsilva merged commit 7ff3480 into concourse:master May 11, 2026
12 checks passed
@taylorsilva taylorsilva mentioned this pull request May 12, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants