This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4980] New: gethostbyname() etc break for /etc/hosts with both ::1 and 127.0.0.1 localhost entries
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 Aug 2007 17:03:57 -0000
- Subject: [Bug libc/4980] New: gethostbyname() etc break for /etc/hosts with both ::1 and 127.0.0.1 localhost entries
- Reply-to: sourceware-bugzilla at sourceware dot org
On Nov 20 a change in nss/nss_files/files-hosts.c:LINE_PARSER was
introduced to treat ::1 the same way as 127.0.0.1. A lot of Linux systems have
127.0.0.1 localhost
::1 localhost
in their /etc/hosts (though most have ip6-localhost for ::1 instead).
The new behavior appears not to be mandated by any standard nor does it seem as
a particularily useful change.
The trouble is that now gethostbyname() (gethostbyname2(), getaddrinfo(), ...)
will return duplicate 127.0.0.1 records in h_addr_list[] and some applications
do not explect duplicate entries in this array (e.g. OpenLDAP). The new
behaviour does not seem to gain anything so the old behavior should be restored.
--
Summary: gethostbyname() etc break for /etc/hosts with both ::1
and 127.0.0.1 localhost entries
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: pasky at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4980
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.