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

Bug#472342: marked as done (default precedence of 2002::/16 in gai.conf is apparently not what it says)



Your message dated Sun, 23 Mar 2008 23:56:42 +0100
with message-id <47E6E02A.8090904@aurel32.net>
and subject line Re: Bug#472342: default precedence of 2002::/16 in gai.conf is apparently not what it says
has caused the Debian Bug report #472342,
regarding default precedence of 2002::/16 in gai.conf is apparently not what it says
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.)


-- 
472342: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472342
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.7-6

Hi,

I have a host with a (global, routable) IPv4 address and a 6to4
(2002::/16) IPv6 address that is derived from it (this is a quite
common setup), and I am trying to connect to another host with the
same setup in the DNS (that is, one A record for an IPv4 address and
one AAAA record for an IPv6 address in 2002::/16, e.g.,
quatramaran.xn--kwg.net is such a host).  I wish to use IPv4
preferentially over 6to4, so I add the following line to /etc/gai.conf

precedence ::ffff:0:0/96  35

(given that the default precedence of 2002::/16 is documented to be
30).  This, however, does not have the desired effect: 6to4 is still
preferred over IPv4 (e.g.: "telnet quatramaran.xn--kwg.net 80" will
try 2002:81c7:8140::1 rather than 129.199.129.64).  However, if I add
the following line:

precedence 2002::/16      30

then the behavior is the desired one.  However the latter line is
supposed to be by default, so adding it should not change the behavior
of getaddrinfo().

Here is an example transcript showing the problem:

orion david ~ $ ip route get 129.199.129.64
129.199.129.64 dev ppp0  src 82.127.104.194 
    cache  mtu 1492 advmss 1452 hoplimit 64
orion david ~ $ ip route get 2002:81c7:8140::1
2002:81c7:8140::1 via ::192.88.99.1 dev tun6to4  src 2002:527f:68c2::3  metric 512  expires 21266585sec mtu 1472 advmss 1412 hoplimit 4294967295
orion david ~ $ egrep '^[^#]' /etc/gai.conf
precedence ::ffff:0:0/96  35
precedence 2002::/16      30
orion david ~ $ host quatramaran.xn--kwg.net
quatramaran.xn--kwg.net has address 129.199.129.64
quatramaran.xn--kwg.net has IPv6 address 2002:81c7:8140::1
orion david ~ $ telnet quatramaran.xn--kwg.net 80
Trying 129.199.129.64...
Connected to quatramaran.xn--kwg.net.
Escape character is '^]'.
^]
telnet> close
Connection closed.
orion david ~ $ echo 'Worked as expected!'
Worked as expected!
orion david ~ $ echo 'But this does not:'
But this does not:
orion david ~ $ sudo perl -pi -e 's/^precedence 2002/\#$&/'
/etc/gai.conf
orion david ~ $ egrep '^[^#]' /etc/gai.conf
precedence ::ffff:0:0/96  35
orion david ~ $ telnet quatramaran.xn--kwg.net 80
Trying 2002:81c7:8140::1...
Connected to quatramaran.xn--kwg.net.
Escape character is '^]'.
^]
telnet> close
Connection closed.

My experiments suggest that precedence of 2002::/16 is effectively at
40, i.e., it is not distinguishing it from ::/0.  I don't understand
why, but whatever the details it's certainly wrong that uncommenting a
line which is supposed to be a default should change anything in what
getaddrinfo() does.

-- 
     David A. Madore
    (david.madore@ens.fr,
     http://www.madore.org/~david/ )



--- End Message ---
--- Begin Message ---
Version: 2.7-7

David Madore a écrit :
> Package: libc6
> Version: 2.7-6
> 
> Hi,
> 
> I have a host with a (global, routable) IPv4 address and a 6to4
> (2002::/16) IPv6 address that is derived from it (this is a quite
> common setup), and I am trying to connect to another host with the
> same setup in the DNS (that is, one A record for an IPv4 address and
> one AAAA record for an IPv6 address in 2002::/16, e.g.,
> quatramaran.xn--kwg.net is such a host).  I wish to use IPv4
> preferentially over 6to4, so I add the following line to /etc/gai.conf
> 
> precedence ::ffff:0:0/96  35
> 
> (given that the default precedence of 2002::/16 is documented to be
> 30).  This, however, does not have the desired effect: 6to4 is still
> preferred over IPv4 (e.g.: "telnet quatramaran.xn--kwg.net 80" will
> try 2002:81c7:8140::1 rather than 129.199.129.64).  However, if I add
> the following line:
> 
> precedence 2002::/16      30
> 
> then the behavior is the desired one.  However the latter line is
> supposed to be by default, so adding it should not change the behavior
> of getaddrinfo().
> 
> Here is an example transcript showing the problem:
> 
> orion david ~ $ ip route get 129.199.129.64
> 129.199.129.64 dev ppp0  src 82.127.104.194 
>     cache  mtu 1492 advmss 1452 hoplimit 64
> orion david ~ $ ip route get 2002:81c7:8140::1
> 2002:81c7:8140::1 via ::192.88.99.1 dev tun6to4  src 2002:527f:68c2::3  metric 512  expires 21266585sec mtu 1472 advmss 1412 hoplimit 4294967295
> orion david ~ $ egrep '^[^#]' /etc/gai.conf
> precedence ::ffff:0:0/96  35
> precedence 2002::/16      30
> orion david ~ $ host quatramaran.xn--kwg.net
> quatramaran.xn--kwg.net has address 129.199.129.64
> quatramaran.xn--kwg.net has IPv6 address 2002:81c7:8140::1
> orion david ~ $ telnet quatramaran.xn--kwg.net 80
> Trying 129.199.129.64...
> Connected to quatramaran.xn--kwg.net.
> Escape character is '^]'.
> ^]
> telnet> close
> Connection closed.
> orion david ~ $ echo 'Worked as expected!'
> Worked as expected!
> orion david ~ $ echo 'But this does not:'
> But this does not:
> orion david ~ $ sudo perl -pi -e 's/^precedence 2002/\#$&/'
> /etc/gai.conf
> orion david ~ $ egrep '^[^#]' /etc/gai.conf
> precedence ::ffff:0:0/96  35
> orion david ~ $ telnet quatramaran.xn--kwg.net 80
> Trying 2002:81c7:8140::1...
> Connected to quatramaran.xn--kwg.net.
> Escape character is '^]'.
> ^]
> telnet> close
> Connection closed.
> 
> My experiments suggest that precedence of 2002::/16 is effectively at
> 40, i.e., it is not distinguishing it from ::/0.  I don't understand
> why, but whatever the details it's certainly wrong that uncommenting a
> line which is supposed to be a default should change anything in what
> getaddrinfo() does.
> 

This if fixed in versions 2.7-7 and above. Closing the bug.


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


--- End Message ---

Reply to: