Daniel's PR fixed the issue only for CURL_IPRESOLVE_V4, but not for CURL_IPRESOLVE_WHATEVER and CURL_IPRESOLVE_IPV6. Even with his PR, both CURL_IPRESOLVE_WHATEVER and CURL_IPRESOLVE_IPV6 will use Curl_ipv6works() and thus face regressions.
Code migrating from IPv4-single libcurl to IPv6 dual-stack, which uses the default CURL_IPRESOLVE_WHATEVER value will face the regression as well. My proposal allows to cover cases where the default Curl_ipv6works() behavior creates problems for CURL_IPRESOLVE_WHATEVER and CURL_IPRESOLVE_IPV6 and solve them by providing a better way to detect whether IPv6 works or not on the system. Before Daniel's PR, the problem was for all three resolve modes: CURL_IPRESOLVE_WHATEVER, CURL_IPRESOLVE_IPV6 and CURL_IPRESOLVE_IPV6 After his PR, the problem remains for two modes: CURL_IPRESOLVE_WHATEVER and CURL_IPRESOLVE_IPV6 My proposal, in addition to Daniel's PR allows to close the gap and avoid connection regressions for all three modes. Thanks, Dmitry Karpov -----Original Message----- From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Dan Fandrich via curl-library Sent: Wednesday, September 21, 2022 1:05 PM To: curl-library@lists.haxx.se Cc: Dan Fandrich <d...@coneharvesters.com> Subject: Re: [EXTERNAL] Re: Feature request: provide ability to set a global callback function telling libcurl if IPv6 works on the system On Wed, Sep 21, 2022 at 07:40:10PM +0000, Dmitry Karpov via curl-library wrote: > Yes, doing things "lazily" in Daniel's PR fixes the problem for explicit > CURL_IPRESOLVE_V4, which will not call Curl_ipv6works() anymore. > But the problem is still there for the CURL_IPRESOLVE_WHATEVER, which is the > default value for the CURLOPT_IPRESOLVE option. I'm clearly missing something. If Daniel's PR fixes the issue by setting CURL_IPRESOLVE_V4, then why not just set CURL_IPRESOLVE_V4 when needed? Why do you feel an additional callback mechanism is still needed? Dan -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html