This is the mail archive of the libc-alpha@sourceware.cygnus.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]

Re: problems with getaddrinfo() and _res.options


I think I have fixed the program in glibc 2.2 now.  It is a fairly
complicated change since the old handling of IPv4->IPv6 address
mapping was completely broken.  The BIND code didn't make any sense.

Anyhow, I have cleaned it up now and probably changed the semantics a
bit.  But to the better I think.

The RES_USE_INET6 bit now decides

- whether gethostbyname() returns an IPv6 address or not.  This is the
  original use

- whether IPv4 addresses are mapped to IPv6 addresses in situations
  where only IPv6 addresses are requested (either in gethostbyname2
  or getaddrinfo, not getipnodebyname)

In no other case is RES_USE_INET6 used.  I think this is the only
possible way to make sense of this.  If you disagree let me know.

As a consequence of these changes getaddrinfo() now does not return
the IPv4 and IPv6 address of a host if AF_UNSPEC is passed in as the
protocol.  This is another change, but again a useful one.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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