mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:03:35 +03:00
resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES
This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request shuffling of IP addresses returned for a hostname when there is more than one. This is useful when the application knows that a round robin approach is appropriate and is willing to accept the consequences of potentially discarding some preference order returned by the system's implementation. Closes #1694
This commit is contained in:
parent
fb4f568b1e
commit
d95f3dc0b1
14 changed files with 270 additions and 3 deletions
|
|
@ -2561,6 +2561,9 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
|
|||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.happy_eyeballs_timeout = arg;
|
||||
break;
|
||||
case CURLOPT_DNS_SHUFFLE_ADDRESSES:
|
||||
data->set.dns_shuffle_addresses = (0 != va_arg(param, long)) ? TRUE:FALSE;
|
||||
break;
|
||||
default:
|
||||
/* unknown tag and its companion, just ignore: */
|
||||
result = CURLE_UNKNOWN_OPTION;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue