Bug 991550

Summary: curl resolves DNS names to IPv6 addresses on an IPv4-only host
Product: [Fedora] Fedora Reporter: James <james>
Component: curlAssignee: Kamil Dudka <kdudka>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: james, kdudka, paul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-17 16:08:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James 2013-08-02 17:36:52 UTC
Curl attempts to contact IPv6 addresses when the host does not have an interface with an IPv6 address. This seems to happen 9/10 times on this machine. Programs such as firefox, ping, nslookup and ssh work correctly. This causes yum to fail to update, since yum uses curl.

Version:
========

[james@mufasa ~]$ curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.14.3.0 zlib/1.2.7 libidn/1.26 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz


How reproducible:
=================

This occurs 9/10 times on this machine.

Steps to Reproduce:
===================

1. Installed Fedora 19 from the full DVD.
2. Set IPv6 in NetworkManager -> IPv6 Settings -> Ignore.
3. Disable IPv6 using:

$sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

4. $curl fedoraproject.org

Actual results:
===============

curl: (6) Could not resolve host: fedoraproject.org; Name or service not known

Expected results:
=================

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
...

Additional info:
================

Forcing curl to use IPv4 causes it to work correctly every time:

$ curl -4 fedoraproject.org
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
...

Comment 1 Kamil Dudka 2013-08-09 09:59:05 UTC
Please attach the output of the following command:

$ getent ahosts fedoraproject.org

Comment 2 Kamil Dudka 2013-09-17 16:08:58 UTC
More than a month in needinfo, closing out...