diff options
author | Rick Deist <dreckard@users.noreply.github.com> | 2018-03-17 20:10:04 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-17 20:44:14 +0100 |
commit | d95f3dc0b117b0677700dae8dd51145c9b6f2d08 (patch) | |
tree | f1f044908f412bc3a946f61fa611884c0ff1611b /lib/setopt.c | |
parent | fb4f568b1e090c884eb63c3419322b558a38138e (diff) | |
download | curl-d95f3dc0b117b0677700dae8dd51145c9b6f2d08.tar.gz |
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
Diffstat (limited to 'lib/setopt.c')
-rw-r--r-- | lib/setopt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c index 737a60f85..da364fa81 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -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; |