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:
Rick Deist 2018-03-17 20:10:04 +01:00 committed by Daniel Stenberg
parent fb4f568b1e
commit d95f3dc0b1
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
14 changed files with 270 additions and 3 deletions

View file

@ -1844,6 +1844,9 @@ typedef enum {
/* send HAProxy PROXY protocol header? */
CINIT(HAPROXYPROTOCOL, LONG, 274),
/* shuffle addresses before use when DNS returns multiple */
CINIT(DNS_SHUFFLE_ADDRESSES, LONG, 275),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;