The command line application is an application, which uses libcurl in its specific way, and it may turn on some features that are turned off by default or implement additional logic doing certain things. So, if you use libcurl "out-of-the-box" in your application with default parameters, I don't think you can expect it to behave the same way as the curl command tool.
You need to tweak libcurl options or follow the same logic in your code to match the behavior of the curl application. -----Original Message----- From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Peter Krefting via curl-library Sent: Tuesday, January 24, 2023 4:24 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 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. For unknown reasons, the command-line curl does come through with an IPv4 call, while using the library directly it does not, unless I disable the use of ares_getaddrinfo(), unless I explicitely select an interface for it to call out on. Note that all interfaces have valid IPv4 configurations, so it ought to work no matter what. -- \\// 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