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]

[PATCH] getaddrinfo/AF_UNSPEC


Hi,

Currently, if you call getaddrinfo() with AF_UNSPEC, we search at
first through the whole service chain for a IPv6 address and than
for a IPv4 one. This means, even if the IPv4 is in /etc/hosts, we
will make a DNS query for the IPv6 address. All other getaddrinfo()
implementations uses always the same service for both addresses.
Which means, if the IPv4 address is found in /etc/hosts, getaddrinfo
will not make a DNS query for the IPv6 address (if you have
"hosts: files dns" in /etc/nsswitch.conf).

The appended patch fixes this for glibc.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Attachment: glibc-2.3.getaddrinfo.diff
Description: Text document


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