1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -05:00

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
This commit is contained in:
James Brown 2019-06-23 23:15:02 -07:00 committed by Daniel Stenberg
parent 1862cacd03
commit d331227cf0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;