-
Notifications
You must be signed in to change notification settings - Fork 634
Support ipv6 link-local servers and %iface syntax #646
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
Merged
Conversation
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
This was referenced Dec 5, 2023
Tested on Ubuntu 22.04 after disabling systemd-resolved with another ubuntu host using radvd to advertise its link local address as a DNS server. Works as intended, and specifically does not work if you omit the %iface. |
shpala
added a commit
to shpala/c-ares
that referenced
this pull request
Apr 16, 2024
and iOS. The issue only happens when using system default link-local IPv6 DNS. Specifying link-local IPv6 DNS address manually works. Disabling libresolv and using the manual parsing fixes the issue after the change made in c-ares#646 On macOS and iOS c-ares uses libresolv and assumes that its API res_getservers() fills sin6_scope_id in case of a link-local IPv6 DNS addresses in /etc/resolv.conf. Unfortunately this is not the case. See res_getservers() here: https://opensource.apple.com/source/libresolv/libresolv-60/res_init.c.auto.html
shpala
added a commit
to shpala/c-ares
that referenced
this pull request
Apr 16, 2024
The issue only happens when using system default link-local IPv6 DNS. Specifying link-local IPv6 DNS address manually works. Disabling libresolv and using the manual parsing fixes the issue after the change made in c-ares#646 On macOS c-ares uses libresolv and assumes that its API res_getservers() fills sin6_scope_id in case of a link-local IPv6 DNS addresses in /etc/resolv.conf. Unfortunately this is not the case. See res_getservers() here: https://opensource.apple.com/source/libresolv/libresolv-60/res_init.c.auto.html
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.
Some environments may send router advertisements on a link setting their link-local (fe80::/10) address as a valid DNS server to the remote system. This will cause a DNS entry to be created like
fe80::1%iface
, since all link-local network interfaces are technically part of the same /10 subnet, it must be told what interface to send packets through explicitly if there are multiple physical interfaces.This PR adds support for the %iface modifier when setting DNS servers via
/etc/resolv.conf
as well as viaares_set_servers_csv()
.For MacOS and iOS it is assumed that libresolve will set the
sin6_scope_id
and should be supported, but my test systems don't seem to read the Router Advertisement for RDNSS link-local. Specifying the link-local dns server on MacOS via adig has been tested and confirmed working.For Windows, this is similar to MacOS in that the system doesn't seem to honor the RDNSS RA, but specifying manually has been tested to work.
At this point, Android support does not exist.
Fixes Bug #462
Supersedes PR #463
Fix By: Brad House (@bradh352) and Serhii Purik (@sergvpurik)