This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/15218] getaddrinfo uses PTR records for canonname if address family specified
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 01 Mar 2013 19:55:54 +0000
- Subject: [Bug network/15218] getaddrinfo uses PTR records for canonname if address family specified
- Auto-submitted: auto-generated
- References: <bug-15218-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15218
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2013-03-01 19:55:54 UTC ---
To clarify what's wrong: it was a common historic misunderstanding that
"canonical" name meant reverse DNS lookups. This was a cause of bad lookup
performance in applications that were using AI_CANNONNAME correctly and not
respecting it to perform PTR lookups. For a reference on why the PTR lookup is
incorrect, see the following paragraphs in POSIX:
>From DESCRIPTION of getaddrinfo:
"If the AI_CANONNAME flag is specified and the nodename argument is not null,
the function shall attempt to determine the canonical name corresponding to
nodename (for example, if nodename is an alias or shorthand notation for a
complete name).
Note:
Since different implementations use different conceptual models, the terms
``canonical name'' and ``alias'' cannot be precisely defined for the general
case. However, Domain Name System implementations are expected to interpret
them as they are used in RFC 1034.
A numeric host address string is not a ``name'', and thus does not have a
``canonical name'' form; no address to host name translation is performed. See
below for handling of the case where a canonical name cannot be obtained."
And from APPLICATION USAGE:
"The term ``canonical name'' is misleading; it is taken from the Domain Name
System (RFC 2181). It should be noted that the canonical name is a result of
alias processing, and not necessarily a unique attribute of a host, address, or
set of addresses. See RFC 2181 for more discussion of this in the Domain Name
System context."
Source:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.