Skip to content
Permalink
Browse files

c-ares: honor port numbers in CURLOPT_DNS_SERVERS

By using ares_set_servers_ports_csv on new enough c-ares.

Fixes #4066
Closes #4067
  • Loading branch information...
Roguelazer authored and bagder committed Jun 24, 2019
1 parent 1862cac commit d331227cf0a0f4a1ae4b97081ed2fd2c55164489
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/asyn-ares.c
@@ -734,7 +734,11 @@ CURLcode Curl_set_dns_servers(struct Curl_easy *data,
return CURLE_OK;

#if (ARES_VERSION >= 0x010704)
#if (ARES_VERSION >= 0x010b00)
ares_result = ares_set_servers_ports_csv(data->state.resolver, servers);
#else
ares_result = ares_set_servers_csv(data->state.resolver, servers);
#endif
switch(ares_result) {
case ARES_SUCCESS:
result = CURLE_OK;

0 comments on commit d331227

Please sign in to comment.
You can’t perform that action at this time.