This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/16077] Get canonical name from /etc/hosts for AF_INET
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 23 Oct 2013 14:20:32 +0000
- Subject: [Bug network/16077] Get canonical name from /etc/hosts for AF_INET
- Auto-submitted: auto-generated
- References: <bug-16077-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16077
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> ---
How do you define "canonical" for entries from the hosts file? The first
hostname on the matching line? For DNS, "canonical" is defined clearly by POSIX
to mean the result of resolving a CNAME record (as opposed to other erroneous
notions like reverse lookups), and POSIX further specifies:
"if the canonical name is not available, then ai_canonname shall refer to the
nodename argument or a string with the same contents"
so the current behavior is correct if hosts file entries do not have canonical
names. On the other hand, some flexibility is allowed:
"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."
So I see no problem with defining a notion of "canonical" for hosts file
entries, but I also see no fundamental reason it's necessary.
--
You are receiving this mail because:
You are on the CC list for the bug.