-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
c-ares: fix IPv6 link-local DNS server support #462151
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
50 changes: 50 additions & 0 deletions
50
pkgs/development/libraries/c-ares/fix-link-local-dns-servers.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| From 0fbeb87f65ad9e9e6cead10d778291db71489f34 Mon Sep 17 00:00:00 2001 | ||
| From: iucoen <68678186+iucoen@users.noreply.github.com> | ||
| Date: Thu, 5 Jun 2025 20:08:43 -0700 | ||
| Subject: [PATCH] Fix IPv6 link-local nameservers in /etc/resolv.conf (#997) | ||
|
|
||
| There are two issues that broke link-local nameservers in resolv.conf | ||
| 1. channel->sock_funcs needs to be initialized before | ||
| ares_init_by_sysconfig() | ||
| 2. The aif_nametoindex and aif_indextoname function pointers were not | ||
| initlized at all. | ||
| --- | ||
| src/lib/ares_init.c | 4 ++-- | ||
| src/lib/ares_set_socket_functions.c | 2 ++ | ||
| 2 files changed, 4 insertions(+), 2 deletions(-) | ||
|
|
||
| diff --git a/src/lib/ares_init.c b/src/lib/ares_init.c | ||
| index ae78262a11..ce6181833c 100644 | ||
| --- a/src/lib/ares_init.c | ||
| +++ b/src/lib/ares_init.c | ||
| @@ -271,6 +271,8 @@ int ares_init_options(ares_channel_t **channelptr, | ||
| goto done; | ||
| } | ||
|
|
||
| + ares_set_socket_functions_def(channel); | ||
| + | ||
| /* Initialize Server List */ | ||
| channel->servers = | ||
| ares_slist_create(channel->rand_state, server_sort_cb, server_destroy_cb); | ||
| @@ -346,8 +348,6 @@ int ares_init_options(ares_channel_t **channelptr, | ||
| goto done; | ||
| } | ||
|
|
||
| - ares_set_socket_functions_def(channel); | ||
| - | ||
| /* Initialize the event thread */ | ||
| if (channel->optmask & ARES_OPT_EVENT_THREAD) { | ||
| ares_event_thread_t *e = NULL; | ||
| diff --git a/src/lib/ares_set_socket_functions.c b/src/lib/ares_set_socket_functions.c | ||
| index cfe434327d..9994e81df5 100644 | ||
| --- a/src/lib/ares_set_socket_functions.c | ||
| +++ b/src/lib/ares_set_socket_functions.c | ||
| @@ -127,6 +127,8 @@ ares_status_t | ||
| channel->sock_funcs.asendto = funcs->asendto; | ||
| channel->sock_funcs.agetsockname = funcs->agetsockname; | ||
| channel->sock_funcs.abind = funcs->abind; | ||
| + channel->sock_funcs.aif_nametoindex = funcs->aif_nametoindex; | ||
| + channel->sock_funcs.aif_indextoname = funcs->aif_indextoname; | ||
| } | ||
|
|
||
| /* Implement newer versions here ...*/ |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.