IPv6 and IPv4 resolver preference bug?

Ulrich Drepper drepper at redhat.com
Fri Dec 12 20:41:50 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Felipe Alfaro Solana wrote:
> Hi!
> Today, however, I have checked again and, what a surprise, it seems the
> resolver is acting somewhat strangely.

Different, not strange.


> First, it's giving preference to
> inet4 sockets over inet6 (telnetting to a host which has both A and AAAA
> records defined, establishes an IPv4 connection over TCP), but what's
> more, here's what "tcpdump" displays:

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

Proper source and address selection is essential.  The getaddrinfo
function now sorts the returned addresses by "goodness" of the address.
 I refer to the RFC for more info.


> As I've read on RFC documents, when both A and AAAA records are defined
> for a given host, the application should give preference to the IPv6
> protocol over the IPv4 protocol.

You are reading outdated material.  Once upon a time this was the best
practice, but it isn't anymore.


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

No bug, _highly_ desirable new functionality.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/2igO2ijCOnn/RHQRAjcKAKCTubTkpJPe103kcu/jlXIK2UzO6ACgpRB+
aPz/MwbzeSOrNn8kP5ZMv4E=
=fBlo
-----END PGP SIGNATURE-----





More information about the fedora-list mailing list