From: James Brown Date: Mon, 24 Jun 2019 06:15:02 +0000 (-0700) Subject: c-ares: honor port numbers in CURLOPT_DNS_SERVERS X-Git-Tag: curl-7_65_2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d331227cf0a0f4a1ae4b97081ed2fd2c55164489;p=curl 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 --- diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 8561a4724..6b14aa698 100644 --- a/lib/asyn-ares.c +++ b/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;