All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* getent hosts address family
@ 2021-04-22 20:53 Philip Rowlands
  0 siblings, 0 replies; only message in thread
From: Philip Rowlands @ 2021-04-22 20:53 UTC (permalink / raw
  To: Michael Kerrisk, Alejandro Colomar, linux-man

man1/getent.1 currently includes:

"""
When one or more key arguments are provided, pass each key to gethostbyaddr(3) or gethostbyname2(3), depending on whether a call to inet_pton(3) indicates that the key is an IPv6 or IPv4 address or not, and display the result.
"""

Please append the following clarification:

"""
For symbolic hostnames, getent hosts always tries an AF_INET6 lookup first, even when the system is not otherwise configured to use IPv6.
"""

The reason is to explain to the user why AAAA DNS queries appear as a result of running "getent hosts example.com" on an IPv4-only system. The code is here if you'd like to confirm:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/getent.c#l294


Thanks,
Phil

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-22 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22 20:53 getent hosts address family Philip Rowlands

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.