Bugzilla – Bug 598574
curl doesn't fall back from IPv6 to IPv4
Last modified: 2016-04-15 11:39:17 UTC
On 11.3 (only tested in the rescue system so far), curl only tries to connect to the IPv6 address of hosts that have both, A and AAAA records and doesn't fall back to IPv4 when the IPv6 connection fails. Rescue:~ # curl http://tclers.tk curl: (7) Failed to connect to 2002:3e70:9ee8::1001: Network is unreachable It works fine when I add the -4 switch. I would expect curl to try the DNS records in turn until one succeeds and only error out when all of them failed.
This is probably due to the libcares2 support recently added (at least, downgrading to libcurl4 from 11.2 fixes it).
reproduced, investigating.
https://sourceforge.net/tracker/?func=detail&aid=2991177&group_id=976&atid=100976
http://article.gmane.org/gmane.network.dns.c-ares/532
C-ares support disabled in curl while this bug gets fixed in c-ares upstream, Im tracking the progress there.
I think this bug (or a very similar one) is still preventing current factory NET-install from my mirror http://www3.zq1.de/opensuse/factory/ It works if I use delta.zq1.de which points to the same IPv4 addr without IPv6. I can see in /var/log/apache2/access.log that no access is tried.
reopening because bug still appears in current Factory version libcurl4-7.20.1-1.5 http://www3.zq1.de/bernhard/temp/curl_ipv6.png If you fixed this issue in a different version or branch, please give a pointer. Marked major, because this issue affects all users of curl like openSUSE-NET-install and git. This gives the issue higher exposure and not in every case, you can use the "-4" switch as workaround. Furthermore this issue will hinder server-operators to use to DNS names with both IPv4 and IPv6 addrs, thus slowing the necessary transition towards IPv6.
Cristian, you forgot to submit curl to openSUSE:Factory. I did it now, it should appear in Factory in a couple of days. https://build.opensuse.org/request/show/40967
The package is submitted.
It was now tested working on current Factory with libcurl4-7.20.1-2.1
This is an autogenerated message for OBS integration: This bug (598574) was mentioned in https://build.opensuse.org/request/show/77837 Factory / curl