[curl/curl] 350db7: ares: always store IPv6 addresses first
Daniel Stenberg <[email protected]> Thu, 03 Jun 2021 14:59:06 -0700
| Newsgroups | gmane.comp.web.curl.cvs |
|---|---|
| Message-ID | <curl/curl/push/refs/heads/bagder/c-ares-happy-eyeball/[email protected]> |
Branch: refs/heads/bagder/c-ares-happy-eyeball
Home: https://github.com/curl/curl
Commit: 350db7c1ea995b27f5296ea770c8ae95190c92fa
https://github.com/curl/curl/commit/350db7c1ea995b27f5296ea770c8ae95190c92fa
Author: Dmitry Karpov <[email protected]>
Date: 2021-06-03 (Thu, 03 Jun 2021)
Changed paths:
M lib/asyn-ares.c
Log Message:
-----------
ares: always store IPv6 addresses first
Trying dual-stack on some embedded platform, I noticed that quite
frequently (20%) libCurl starts from IPv4 regardless the Happy Eyeballs
timeout value. After debugging this issue, I noticed that this happens
if c-ares resolver response for IPv6 family comes before IPv4 (which was
randomly happening in my tests).
In such cases, because libCurl puts the last resolver response on top of
the address list, when IPv4 resolver response comes after IPv6 one - the
IPv4 family starts the connection phase instead of IPv6 family.
The solution for this issue is to always put IPv6 addresses on top of
the address list, regardless the order of resolver responses.
Bug: https://curl.se/mail/lib-2021-06/0003.html
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits