This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getaddrinfo(AF_UNSPEC,AI_PASSIVE) result order


Thanks for the pointers. So IPv6 address ordering is a known issue (I actually have seen it working properly on older glibc, so it's probably a regression), and it will be fixed for fedora 19 or soon? Is there a bug number so that I track it?


Thanks,
Dimitris

On Fri, 7 Jun 2013, Godmar Back wrote:

See

http://sourceware.org/ml/libc-help/2011-12/msg00000.html
http://sourceware.org/ml/libc-help/2013-03/msg00002.html

On Fri, Jun 7, 2013 at 3:50 PM, Dimitrios Apostolou <jimis@gmx.net> wrote:
Hello list,

getaddrinfo(AF_UNSPEC, AI_PASSIVE) on my RHEL 6.3 system returns first
0.0.0.0 and second ::0. However according to RFC 3484, paragraph 10.3:

    The default policy table gives IPv6 addresses higher precedence than
    IPv4 addresses. This means that applications will use IPv6 in
    preference to IPv4 when the two are equally suitable. An
    administrator can change the policy table to prefer IPv4 addresses by
    giving the ::ffff:0.0.0.0/96 prefix a higher precedence:

The glibc resolver precedence is changed by tweaking /etc/gai.conf, which is
empty on this system. As a result my application listens only to IPv4, even
though IPv6 loopback works as expected:

# ping6 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.237 ms


What am I missing?

Thanks,
Dimitris




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]