Bug 699421

Summary: ssh requests ipv6 addresses even with ipv6 disabled
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: opensshAssignee: Jan F. Chadima <jchadima>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jchadima, mattias.ellert, mgrepl, tmraz
Target Milestone: ---Keywords: EasyFix, Patch, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: openssh-5.6p1-31.fc15.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-30 23:23:53 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Orion Poplawski 2011-04-25 11:19:27 EDT
Description of problem:

I have a DSL router that fails to respond to AAAA records properly:

  3.853196 -> DNS Standard query A pkgs.fedoraproject.org
  3.853344 -> DNS Standard query AAAA pkgs.fedoraproject.org
  3.897350 -> DNS Standard query response A
  3.903481 -> DNS Standard query response

This results in:

ssh: Could not resolve hostname pkgs.fedoraproject.org: Name or service not known

This is the case even with ipv6 completely disabled.  Work around is to run "ssh -4 hostname".  Other programs like firefox and thunderbird work with ipv6 disabled.

Version-Release number of selected component (if applicable):

See also bug 697149.
Comment 1 Orion Poplawski 2011-04-25 13:08:20 EDT
This should fix:

--- openssh-5.6p1/sshconnect.c.getaddrinfo      2011-04-25 11:02:00.622740776 -0600
+++ openssh-5.6p1/sshconnect.c  2011-04-25 11:06:39.505254267 -0600
@@ -343,6 +343,7 @@
        memset(&hints, 0, sizeof(hints));
        hints.ai_family = family;
        hints.ai_socktype = SOCK_STREAM;
+       hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
        snprintf(strport, sizeof strport, "%u", port);
        if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
                fatal("%s: Could not resolve hostname %.100s: %s", __progname,
Comment 2 Orion Poplawski 2011-04-27 11:38:24 EDT
I see this has been fixed in rawhide, will we see it fixed in F15 soon?  Thanks!
Comment 3 Jan F. Chadima 2011-04-28 01:52:20 EDT
please test it and report. I do not put it into f15 before positive feedback.
If you have no way how to test it in rawhide I prepare testing package for you.
Comment 4 Orion Poplawski 2011-04-28 22:59:34 EDT
Works perfectly.  Thanks.
Comment 5 Fedora Update System 2011-04-29 03:25:57 EDT
openssh-5.6p1-31.fc15.1 has been submitted as an update for Fedora 15.
Comment 6 Fedora Update System 2011-04-29 20:47:29 EDT
Package openssh-5.6p1-31.fc15.1:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openssh-5.6p1-31.fc15.1'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2011-04-30 23:23:48 EDT
openssh-5.6p1-31.fc15.1 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.