+++ This bug was initially created as a clone of Bug #548269 +++ Description of problem: My last yum update on rawhide included curl and libcurl, and since then I can't access fedoraproject.org via yum (w/ libcurl) or even directly with curl. Version-Release number of selected component (if applicable): curl-7.19.7-8.fc13.i686 libcurl-7.19.7-8.fc13.i686 (also happens on x86_64) How reproducible: 100% Steps to Reproduce: 1. curl -v fedoraproject.org Actual results: * About to connect() to fedoraproject.org port 80 (#0) * Trying 2610:28:200:1::fed0:1... Failed to connect to 2610:28:200:1::fed0:1: Network is unreachable * Success * couldn't connect to host * Closing connection #0 curl: (7) Failed to connect to 2610:28:200:1::fed0:1: Network is unreachable Expected results: The HTML dump of Fedora's home. :) Additional info: Curl appears to be fine with pure-IPv4 hosts (e.g. www.google.com). If I completely disable IPv6 in the kernel, then curl says: * About to connect() to fedoraproject.org port 80 (#0) * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host If I explicitly add "--ipv4", then it works fine. With the previous version, that wasn't necessary, of course. And I have no way of forcing other libcurl apps in this way. According to yum history, my previously working curl/libcurl was 7.19.7-4.fc13.i686. I can't find that version at the moment to try rolling back, as koji seems to be down. However, I tried 7.19.6-10.fc12.i686, and that seems to work fine as well. --- Additional comment from kdudka on 2009-12-17 05:44:39 EDT --- Thanks for the report! curl was switched to c-ares for name resolving in Fedora 13 and this feature hasn't been implemented in c-ares yet. I'll clone this bug for that package. > If I explicitly add "--ipv4", then it works fine. With the previous version, > that wasn't necessary, of course. And I have no way of forcing other libcurl > apps in this way. We can of course implement a way to do the same for applications in the meantime. What about adding a new environment variable (e.g. CURL_DISABLE_IPV6) to achieve this? Which applications are you actually focused on? > According to yum history, my previously working curl/libcurl was > 7.19.7-4.fc13.i686. I can't find that version at the moment to try rolling The above mentioned change was done in 7.19.6-11.fc13. If the same worked for you in 7.19.7-4.fc13, it must have been a bug in your network ;-)
I poked a bit around in the c-ares source for this. I think that since c-ares is producing a struct hostent, it will be limited to only a single protocol of results. There's only one h_addrtype field to represent the entire list of results, so it can't mix IPv4 and IPv6. Thus, I believe the API would have to change to support mixed protocols.
The upstream for c-ares is pretty active, so they might be open to considering making an API change to support this functionality.
Sure. Upstream is aware of the situation in Fedora. I've discussed the topic with Daniel Stenberg (already CC'd) and he has really no problem with accepting such a patch.
I've experimentally built (lib)curl based on threaded DNS resolver in order to replace c-ares. We'll see if the approach fits well into Fedora. http://koji.fedoraproject.org/koji/buildinfo?buildID=168222
Starting by 7.20.1-1.fc13, libcurl no longer uses c-ares for name resolving. It means that up2date libcurl is no more affected by this bug.
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component.