I think the problem was that you had only one network interface working - eth1, and by some reason the system gave libcurl a non-functional one. If you can't reproduce this issue, then it seems that your system now picks a working one.
Not sure, how it could be related to using old c-ares approach, but it is good that it is working now. -----Original Message----- From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Peter Krefting via curl-library Sent: Monday, January 23, 2023 2:09 AM To: Dmitry Karpov via curl-library <curl-library@lists.haxx.se> Cc: Peter Krefting <pe...@softwolves.pp.se> Subject: [EXTERNAL] RE: IPv6 issues with ares_getaddrinfo() Hi! > I guess it will help if you provide full Curl verbose output for both cases, > otherwise, it is not clear if the resolution was the same. > For example, ares_getaddrinfo() might give IPv6 name resolution vs IPv4 one > when using the old approach. Interestingly enough, I am not able to duplicate the issue when using the curl binary any longer; in my initial testing also calling through the curl binary failed, several recompiles later that is not the case. Using the unpatched libcurl.so file does still fail my testing binary, so there might be some setup that differ. >> I'm not sure how to do that, sorry. > You can use the CURLOPT_INTERFACE option. It gives the ability to specify the > network interface by IP address. Setting it to "host!" and the IPv6 address of each interface (2a06...) gives me a "failed to connect: Error" (28) after a timeout, for all connections, the same that I get for HTTPS when not specifying. Using "if!eth0" gives me the same, whereas "if!eth1" does succeed to go through (with IPv4, I assume). Using "host!" and the IPv4 address of each interface succeeds. So, in summary: iface | host!IPv6 | host!IPv4 | if!name ------+-----------+-----------+--------- eth0 | error | OK | error eth1 | error | OK | OK eth2 | error | OK | error libcurl reports (strerror [CURLcode]: CURL_ERRORBUFFER): "Error [28]: Failed to connect to license.microanalytics.org port 80 after 15201 ms: Error" -- \\// Peter - http://www.softwolves.pp.se/ -- 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