Re: IPv6 and IPv4 resolver preference bug?

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

 



On Fri, 2003-12-12 at 21:41, Ulrich Drepper wrote:

> Read RFC 3484.  I've implemented it as far as I could in glibc now and
> the one in rawhide uses this code.

Yeah! I have already read RFC 3484, but didn't know it was being
implemented ATM. I was combining 192.168/16 IPv4 addresses and 2002::/16
addresses. Since 192.168/16 is considered site-local, and 2002::/16 is
global, the algorithm was preferring IPv4 addresses to IPv6 addresses.

I have renumbered my network to use site-local fec0::/16 addresses
instead. However, there's an internet draft that is proposing to
deprecate site-local addresses in favor of global addresses. That is the
reason I was already using global IPv6 unicast addresses instead of
site-local.

> Proper source and address selection is essential.  The getaddrinfo
> function now sorts the returned addresses by "goodness" of the address.

By having site-local IPv6 addresses and site-local IPv4 addresses
assigned to both local and remote interfaces, the algorithm is giving
preference to IPv6 addresses. This is the expected behavior to ease
transition to IPv6. Thus, right now, it's behaving like in previous
versions of glibc.

Thanks for the clarifications :-)

> > Does anyone know what's going on here? Is this a glibc's libresolv bug?

However, I still don't understand why, when doing a telnet to a remote
host, tcpdump throws the following:

01:02:55.574680 192.168.0.100.32781 > 192.168.0.1.domain:  40841+ AAAA?
glass.xxx.com. (41) (DF)
01:02:55.578531 192.168.0.1.domain > 192.168.0.100.32781:  40841* 1/2/2
AAAA[|domain] (DF)
01:02:55.579278 192.168.0.100.32781 > 192.168.0.1.domain:  40842+ A?
glass.xxx.com. (41) (DF)
01:02:55.582638 192.168.0.1.domain > 192.168.0.100.32781:  40842* 1/2/2
A[|domain] (DF)
01:02:55.583797 192.168.0.100.32781 > 192.168.0.1.domain:  47979+ PTR?
\[xfec00000000000000000000000000001/128][|domain] (DF)
01:02:55.587512 192.168.0.1.domain > 192.168.0.100.32781:  47979* 1/2/2
(157) (DF)
01:02:55.588565 192.168.0.100.32781 > 192.168.0.1.domain:  47980+ PTR?
2.0.168.192.in-addr.arpa. (42) (DF)
01:02:55.591574 192.168.0.1.domain > 192.168.0.100.32781:  47980* 1/1/1
PTR[|domain] (DF)
01:02:55.592445 192.168.0.100.32781 > 192.168.0.1.domain:  47981+ A?
glass.xxx.com. (41) (DF)
01:02:55.595799 192.168.0.1.domain > 192.168.0.100.32781:  47981* 1/2/2
A[|domain] (DF)
01:02:55.596616 fec0::204:75ff:feab:6fcc.32811 > fec0::1.telnet: S
1651294112:1651294112(0) win 5760 <mss 1440,sackOK,timestamp 2468376
0,nop,wscale 0>
01:02:55.596781 fec0::1.telnet > fec0::204:75ff:feab:6fcc.32811: S
2071276562:2071276562(0) ack 1651294113 win 5712 <mss
1440,sackOK,timestamp 62832827 2468376,nop,wscale 0>
...

Why is the DNS server queried two times for the A record of the remote
host (glass.xxx.com)? Even more, why, since, this time, IPv6 wins over
IPv4?

Thanks!




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux