Bug 598574 - curl doesn't fall back from IPv6 to IPv4
Summary: curl doesn't fall back from IPv6 to IPv4
Status: VERIFIED FIXED
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: Network (show other bugs)
Version: Milestone 5
Hardware: All Other
: P3 - Medium : Major with 1 vote (vote)
Target Milestone: RC 1
Assignee: Cristian Rodriguez
QA Contact: E-mail List
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-21 17:05 UTC by Reinhard Max
Modified: 2016-04-15 11:39 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhard Max 2010-04-21 17:05:00 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.
Comment 1 Michal Marek 2010-04-22 07:38:56 UTC
This is probably due to the libcares2 support recently added (at least, downgrading to libcurl4 from 11.2 fixes it).
Comment 2 Cristian Rodriguez 2010-04-23 00:44:06 UTC
reproduced, investigating.
Comment 4 Cristian Rodriguez 2010-04-24 15:08:53 UTC
http://article.gmane.org/gmane.network.dns.c-ares/532
Comment 5 Cristian Rodriguez 2010-05-10 01:13:54 UTC
C-ares support disabled in curl while this bug gets fixed in c-ares upstream, Im tracking the progress there.
Comment 6 Bernhard Wiedemann 2010-05-31 10:58:15 UTC
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.
Comment 7 Bernhard Wiedemann 2010-06-02 04:42:11 UTC
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.
Comment 8 Michal Marek 2010-06-02 06:30:27 UTC
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
Comment 9 Michal Marek 2010-06-02 14:25:30 UTC
The package is submitted.
Comment 10 Bernhard Wiedemann 2010-06-04 08:09:57 UTC
It was now tested working on current Factory with libcurl4-7.20.1-2.1
Comment 11 Bernhard Wiedemann 2016-04-15 11:39:17 UTC
This is an autogenerated message for OBS integration:
This bug (598574) was mentioned in
https://build.opensuse.org/request/show/77837 Factory / curl