Fix CURLOPT_DNS_SHUFFLE_ADDRESSES #3110
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Further error handling was added during merging of #1694, changing the return type of
Curl_shuffle_addr
from void toCURLcode
. Unfortunately an incorrect check on the return type made its way in, causingCurl_cache_addr
to always fail ifCURLOPT_DNS_SHUFFLE_ADDRESSES
is enabled.The unit test for
CURLOPT_DNS_SHUFFLE_ADDRESSES
(1608) did not catch this because it does not callCurl_cache_addr
, only verifying that:curl_easy_setopt
succeedsCurl_shuffle_addr
returns successThis PR just fixes the one return value comparison mentioned and things seem to work as expected after that. Let me know if you think it would be worth any test changes, but this can probably just be considered the one time introductory pain of a rarely used new option :)