Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 214839

Summary: sys-libs/glibc-2.6.1 resolver maps IPv6 only ::1 to IPv4 127.0.0.1
Product: Gentoo Linux Reporter: Sylvain BERTRAND <sylvain.bertrand>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2007.0   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: getaddrinfo program

Description Sylvain BERTRAND 2008-03-26 09:22:54 UTC
Have an IPv6 only /etc/hosts and put that line:
::1 localhost
Compile and run the provided program, you will see that localhost is resolved to IPv4 127.0.0.1 and should be IPv6 ::1.

You can use a line like this in your /etc/hosts:
192.168.0.100 foo
Modify the name to resolve in the provided program, it will resolve ok, namely only IPv4.

If you do the same in your /etc/hosts with an IPv6:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx foofoo
Modify the name to resolve in the provided program, it will resolve ok, namely only IPv6

(BTW, the man page says of getaddrinfo says the first entry should point to the full canonical name which seems not to be the case, another bug?)
Comment 1 Sylvain BERTRAND 2008-03-26 09:24:01 UTC
Created attachment 147356 [details]
getaddrinfo program
Comment 2 SpanKY gentoo-dev 2008-03-26 15:24:48 UTC

*** This bug has been marked as a duplicate of bug 199025 ***