diff options
author | James Brown <roguelazer@roguelazer.com> | 2019-06-23 23:15:02 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-06-24 15:34:16 +0200 |
commit | d331227cf0a0f4a1ae4b97081ed2fd2c55164489 (patch) | |
tree | f5651b69d995d6f3a18ded49f9e41373e6a7a0c7 | |
parent | 1862cacd038a0b6a0360528162e1719f8f164126 (diff) |
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
-rw-r--r-- | lib/asyn-ares.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |