CVSROOT:        /cvs
Module name:    src
Changes by:     sperrea...@cvs.openbsd.org      2014/04/28 15:38:59

Modified files:
        include        : netdb.h 
        lib/libc/asr   : getaddrinfo_async.c 
        lib/libc/net   : getaddrinfo.3 

Log message:
Implement AI_ADDRCONFIG

This is a getaddrinfo() flag that is defined thusly in RFC 3493:

If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
returned only if an IPv4 address is configured on the local system,
and IPv6 addresses shall be returned only if an IPv6 address is
configured on the local system.  The loopback address is not
considered for this case as valid as a configured address.

For example, when using the DNS, a query for AAAA records should
occur only if the node has at least one IPv6 address configured
(other than IPv6 loopback) and a query for A records should occur
only if the node has at least one IPv4 address configured (other
than the IPv4 loopback).

The flag is set by default when hints is NULL.

ok Eric Faurot, Jason McIntyre

Reply via email to