Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mmickan
Copy link
Contributor

@mmickan mmickan commented May 14, 2025

1. Why is this pull request needed and what does it do?

On a host with an IPv4 link-local address assigned to an interface that CoreDNS is configured to bind to, this happens:

$ ./coredns -conf=/etc/coredns/Corefile
maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined
lookup 169.254.1.1%dummy0: no such host

This PR fixes an incorrect test for an IPv6 address so it only adds the zone to IPv6 addresses, never to IPv4.

2. Which issues (if any) are related?

#6547 introduced the bug.

3. Which documentation changes (if any) need to be made?

None, this makes it work the way the documentation already says it works. 😃

4. Does this introduce a backward incompatible change or deprecation?

No.

@mmickan mmickan requested a review from miekg as a code owner May 14, 2025 00:41
@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.64%. Comparing base (93c57b6) to head (03ca6bc).
Report is 1452 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7295      +/-   ##
==========================================
+ Coverage   55.70%   57.64%   +1.93%     
==========================================
  Files         224      273      +49     
  Lines       10016    17892    +7876     
==========================================
+ Hits         5579    10313    +4734     
- Misses       3978     6968    +2990     
- Partials      459      611     +152     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yongtang
Copy link
Member

@mmickan mmickan force-pushed the fix-bind-iface-link-local-ipv4 branch 2 times, most recently from ecc528e to 4d33af0 Compare May 20, 2025 02:34
This fixes a bug introduced in
coredns#6547 which resulted in the zone
being added to IPv4 addresses.  This bug results in a failure to start
when binding to an interface with a link-local IPv4 address assigned to
it, with the following error:

    $ ./coredns -conf=/etc/coredns/Corefile
    maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined
    lookup 169.254.1.1%dummy0: no such host

Signed-off-by: Mark Mickan <[email protected]>
@mmickan mmickan force-pushed the fix-bind-iface-link-local-ipv4 branch from 4d33af0 to 03ca6bc Compare May 20, 2025 02:39
@mmickan
Copy link
Contributor Author

mmickan commented May 20, 2025

Hi @yongtang ,

The DCO check is now passing and I've rebased on master while I was at it.

Thanks,
Mark

@yongtang yongtang merged commit 1de92ec into coredns:master May 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants