[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#684794: marked as done (getaddrinfo sorts IPv4 before IPv6)



Your message dated Tue, 14 Aug 2012 13:12:49 +0200
with message-id <502A32B1.2000302@debian.org>
and subject line Re: Bug#684794: getaddrinfo sorts IPv4 before IPv6
has caused the Debian Bug report #684794,
regarding getaddrinfo sorts IPv4 before IPv6
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
684794: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684794
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.13-35
Severity: normal
Tags: ipv6

Hi,

I recently configured IPv6 connectivity on my system using 6to4 on my
router. It works, except that getaddrinfo() sorts IPv4 addresses
before IPv6 addresses, which means that IPv4 is used if the remote
host has both IPv4 and IPv6.

Here's an example:

$ getent ahosts www.debian.org
86.59.118.148   STREAM www.debian.org
86.59.118.148   DGRAM  
86.59.118.148   RAW    
2001:858:2:2:214:22ff:fe0d:7717 STREAM 
2001:858:2:2:214:22ff:fe0d:7717 DGRAM  
2001:858:2:2:214:22ff:fe0d:7717 RAW

I see the same behavior in chromium and iceweasel. If I go to
http://ip6.me/, I see my IPv4 address instead of my IPv6 address. If I
click "IPv6 only Test" I get my IPv6 address
(http://ipv6.whatismyv6.com/).

My ifconfig output looks like this:

eth0      Link encap:Ethernet  HWaddr 00:24:81:18:a7:9e  
          inet addr:192.168.1.195  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2002:d567:c828:1:224:81ff:fe18:a79e/64 Scope:Global
          inet6 addr: fe80::224:81ff:fe18:a79e/64 Scope:Link

That is, I have a NAT'ed IPv4 address and a global (non-NAT'ed) 6to4
IPv6 address. The actual 6to4 relaying is done by my router.

ping6 and browsing IPv6-only domains (e.g., ipv6.google.com) work fine.

I have not modified /etc/gai.conf which is empty (except for comments).

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=sv_SE.utf8, LC_CTYPE=sv_SE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin  2.13-35
ii  libgcc1   1:4.7.1-6

Versions of packages libc6 recommends:
ii  libc6-i686  2.13-35

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]  1.5.45
pn  glibc-doc              <none>
ii  locales                2.13-35

-- debconf information excluded

--- End Message ---
--- Begin Message ---
2012-08-14 12:38, Bastian Blank skrev:
> This is expected behaviour if you are using 2002::/16 addresses:
> 
> |    Rule 7:  Prefer native transport.
> |    If DA is reached via an encapsulating transition mechanism (e.g.,
> |    IPv6 in IPv4) and DB is not, then prefer DB.  Similarly, if DB
> |    is reached via encapsulation and DA is not, then prefer DA.
> 

Oh.., I missed that rule. It worked differently last time I tried IPv6.

Anyway, thanks for the info! Closing this bug.

-- 
Pelle

--- End Message ---

Reply to: