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

@ -177,6 +177,7 @@ test1533 test1534 test1535 test1536 test1537 test1538 \
test1540 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
test1608 \
\
test1700 test1701 test1702 \
\

26
tests/data/test1608 Normal file
View file

@ -0,0 +1,26 @@
<testcase>
<info>
<keywords>
unittest
curlopt_dns_shuffle_addresses
</keywords>
</info>
#
# Client-side
<client>
<server>
none
</server>
<features>
unittest
</features>
<name>
verify DNS shuffling
</name>
<tool>
unit1608
</tool>
</client>
</testcase>