Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
RE: IPv6 issues with ares_getaddrinfo()
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Peter Krefting via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 23 Jan 2023 11:08:34 +0100 (CET)
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"
Date: Mon, 23 Jan 2023 11:08:34 +0100 (CET)
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.htmlReceived on 2023-01-23