Closed
Conversation
Use `ares_strerror()` to retrieve error message from c-ares. Add optional detail to `Curl_resolver_error()` to add to failure message where available. This makes, for c-ares, the reason for a failed resource available to the user without extra trace config. When "dns" tracing enabled, print the c-ares server config at the start of a resolve.
Closed
vszakats
reviewed
Aug 11, 2025
| #endif | ||
|
|
||
| failf(data, "Could not resolve %s: %s", host_or_proxy, name); | ||
| failf(data, "Could not resolve %s: %s%s%s%s", host_or_proxy, name, |
Contributor
There was a problem hiding this comment.
This doesn't seem to affect the Could not resolve hostname message when it fails to resolve the DOH server, it'd be nice to change that one too.
jmaggard10
reviewed
Sep 23, 2025
|
|
||
| #if ARES_VERSION >= 0x011800 /* >= v1.24.0 */ | ||
| CURL_TRC_DNS(data, "asyn-ares: servers=%s", | ||
| ares_get_servers_csv(ares->channel)); |
Contributor
There was a problem hiding this comment.
According to the ares_get_servers_csv() man page:
ares_get_servers_csv(3) returns a string representing the servers configured which must be freed with ares_free_string(3).
So this should leak memory every time it's called.
Contributor
bagder
pushed a commit
that referenced
this pull request
Sep 24, 2025
When DNS tracing is enabled, a string allocated by ares was not freed. Reported-by: jmaggard10 on github Bug: #18251 (review) Closes #18691
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
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.
Use
ares_strerror()to retrieve error message from c-ares.Add optional detail to
Curl_resolver_error()to add to failure message where available. This makes, for c-ares, the reason for a failed resource available to the user without extra trace config.When "dns" tracing enabled, print the c-ares server config at the start of a resolve.