Bug 804689 - getaddrinfo("localhost6") returns
getaddrinfo("localhost6") returns
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc (Show other bugs)
x86_64 Unspecified
high Severity high
: beta
: ---
Assigned To: Jeff Law
: Regression, TestBlocker
: 807224 807357 810780 (view as bug list)
Depends On:
Blocks: 805204
  Show dependency treegraph
Reported: 2012-03-19 11:24 EDT by Jan Safranek
Modified: 2016-02-12 06:16 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 08:10:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer (1.07 KB, text/plain)
2012-03-19 11:30 EDT, Jan Safranek
no flags Details

  None (edit)
Description Jan Safranek 2012-03-19 11:24:18 EDT
Description of problem:

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Jan Safranek 2012-03-19 11:29:23 EDT
(sorry, I pressed Enter accidentally)

Description of problem:
getaddrinfo("localhost6") returns instead of ::1.

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

How reproducible:

Steps to Reproduce:
1. compile attached program (it just prints results of getaddrinfo)
2. ./get localhost6

Actual results:

Expected results:
Address: ::1

Additional info:
glibc-2.12-1.70.el6.x86_64 works perfectly
Comment 2 Jan Safranek 2012-03-19 11:30:21 EDT
Created attachment 571150 [details]
Comment 3 Jan Safranek 2012-03-19 11:31:51 EDT
My /etc/hosts:	localhost.localdomain	localhost
::1	localhost6.localdomain6	localhost6
Comment 7 Jeff Law 2012-03-21 11:47:47 EDT
I'm working on it.
Comment 8 Jeff Law 2012-03-21 14:26:36 EDT
The changes for 797094 to avoid unbounded allocas had a non-obvious dependency on a prior, seemingly unrelated change.

QA: We really need to include this in 6.3.  The testcase is pretty trivial.  Install the host file noted in c#3, then compile & run the code already attached to this bug with the argument "localhost6".

If the result is, then we failed.  ::1 is the expected result.
Comment 10 Jeff Law 2012-03-29 12:13:12 EDT
*** Bug 807224 has been marked as a duplicate of this bug. ***
Comment 11 Jeff Law 2012-04-09 17:51:32 EDT
*** Bug 810780 has been marked as a duplicate of this bug. ***
Comment 12 IBM Bug Proxy 2012-04-09 17:54:32 EDT
Created attachment 576309 [details]
strace outputs of ping6
Comment 13 IBM Bug Proxy 2012-04-09 17:54:37 EDT
Created attachment 576310 [details]
tcpdump and strace logs
Comment 14 IBM Bug Proxy 2012-04-09 22:01:10 EDT
------- Comment From pthan@cn.ibm.com 2012-04-10 01:58 EDT-------
Hi Redhat,

I believe there is no use to attach the sosreport anymore now, right?
Comment 15 IBM Bug Proxy 2012-04-11 01:00:53 EDT
------- Comment From srinivasa.tn@in.ibm.com 2012-04-11 04:56 EDT-------
Hi RH,
The status of the mirrored bug states that it is verified.  Can I have the access to patch in which it is fixed or can you the release in which it will be fixed?

Comment 16 IBM Bug Proxy 2012-04-23 03:30:41 EDT
------- Comment From pthan@cn.ibm.com 2012-04-23 07:25 EDT-------
This bug has been fixed in glibc-2.12-1.78.el6.ppc64:

[root@bandlp1 ~]# ping6 zenlp3-sl
PING zenlp3-sl(zenlp3-sl.ipv6.upt.austin.ibm.com) 56 data bytes
64 bytes from zenlp3-sl.ipv6.upt.austin.ibm.com: icmp_seq=1 ttl=64 time=19.2 ms
64 bytes from zenlp3-sl.ipv6.upt.austin.ibm.com: icmp_seq=2 ttl=64 time=0.491 ms
Comment 17 Karel Srot 2012-04-24 09:37:07 EDT
*** Bug 807357 has been marked as a duplicate of this bug. ***
Comment 18 Maciej Żenczykowski 2012-05-30 01:34:43 EDT
Confirmed broken on Fedora 17:

host and ssh appear broken (localhost6 ->, but telnet appears to work (localhost6 -> ::1) 

[maze@varda ~]$ cat /etc/nsswitch.conf | egrep hosts
hosts:      files dns myhostname

[maze@varda ~]$ cat /etc/hosts | egrep localhost   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

[maze@varda ~]$ telnet localhost6 1
Trying ::1...
telnet: connect to address ::1: Connection refused

[maze@varda ~]$ ssh -v -p 1 localhost6
OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /home/maze/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
debug1: Connecting to localhost6 [] port 1.
debug1: connect to address port 1: Connection refused
ssh: connect to host localhost6 port 1: Connection refused

[maze@varda ~]$ host localhost6
localhost6.localdomain is an alias for localhost.
localhost has address

[maze@varda ~]$ ping localhost6
PING localhost ( 56(84) bytes of data.
64 bytes from localhost ( icmp_req=1 ttl=64 time=0.092 ms
64 bytes from localhost ( icmp_req=2 ttl=64 time=0.048 ms
--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.048/0.070/0.092/0.022 ms

[maze@varda ~]$ ping6 localhost6
PING localhost6(localhost) 56 data bytes
64 bytes from localhost: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from localhost: icmp_seq=2 ttl=64 time=0.052 ms
--- localhost6 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.031/0.041/0.052/0.012 ms
Comment 20 errata-xmlrpc 2012-06-20 08:10:05 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.