Bug 804689 - getaddrinfo("localhost6") returns
Summary: getaddrinfo("localhost6") returns
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.3
Hardware: x86_64
OS: Unspecified
Target Milestone: beta
: ---
Assignee: Jeff Law
QA Contact: qe-baseos-tools
: 807224 807357 810780 (view as bug list)
Depends On:
Blocks: 805204
TreeView+ depends on / blocked
Reported: 2012-03-19 15:24 UTC by Jan Safranek
Modified: 2016-02-12 11:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-06-20 12:10:05 UTC
Target Upstream Version:

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

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0763 normal SHIPPED_LIVE glibc bug fix and enhancement update 2012-06-19 20:35:39 UTC

Description Jan Safranek 2012-03-19 15:24:18 UTC
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 15:29:23 UTC
(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 15:30:21 UTC
Created attachment 571150 [details]

Comment 3 Jan Safranek 2012-03-19 15:31:51 UTC
My /etc/hosts:	localhost.localdomain	localhost
::1	localhost6.localdomain6	localhost6

Comment 7 Jeff Law 2012-03-21 15:47:47 UTC
I'm working on it.

Comment 8 Jeff Law 2012-03-21 18:26:36 UTC
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 16:13:12 UTC
*** Bug 807224 has been marked as a duplicate of this bug. ***

Comment 11 Jeff Law 2012-04-09 21:51:32 UTC
*** Bug 810780 has been marked as a duplicate of this bug. ***

Comment 12 IBM Bug Proxy 2012-04-09 21:54:32 UTC
Created attachment 576309 [details]
strace outputs of ping6

Comment 13 IBM Bug Proxy 2012-04-09 21:54:37 UTC
Created attachment 576310 [details]
tcpdump and strace logs

Comment 14 IBM Bug Proxy 2012-04-10 02:01:10 UTC
------- 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 05:00:53 UTC
------- 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 07:30:41 UTC
------- 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 13:37:07 UTC
*** Bug 807357 has been marked as a duplicate of this bug. ***

Comment 18 Maciej Żenczykowski 2012-05-30 05:34:43 UTC
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 12:10:05 UTC
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.