This is the mail archive of the libc-alpha@sources.redhat.com 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 and AF_UNSPEC w/ IPv4/6 messes up ai_canonname?


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

Pekka Savola wrote:

I noticed something strange when using getaddrinfo to get both IPv4 and IPv6 addresses w/ AI_CANONNAME.
Your example code fails to iterate over all results. This is what I get if I modify the output part of your code to iterate via ai_next:

host: ftp.kame.net, canon (if any): 2001:200:0:4819:210:f3ff:fe03:4d0
host: ftp.kame.net, canon (if any): 3ffe:501:4819:2000:210:f3ff:fe03:4d0
host: ftp.kame.net, canon (if any): kame220.kame.net


Now you see that indeed the right canonical name is generated. Why should the implementation not return the IPv6 entries? This is what your report seems to imply. One could argue that returning the numeric format should never happen. But where is this written? It's easy enough to implement but I am not willing to make a change unless you can motivate it.

- -- - ---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9Zzw82ijCOnn/RHQRAhcYAJoCQ8/YbC7p0wObIYbSP2AngWbNwwCZAXrn
efV1jc+MOc+AgP/UH1UdGRs=
=GdVw
-----END PGP SIGNATURE-----


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