From d95f3dc0b117b0677700dae8dd51145c9b6f2d08 Mon Sep 17 00:00:00 2001 From: Rick Deist Date: Sat, 17 Mar 2018 20:10:04 +0100 Subject: 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 --- include/curl/curl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 43d5e031f..3fd4ca87d 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -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; -- cgit v1.2.3