mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-07 13:28:05 +08:00
drop v6-to-v4 conversions of loopback addresses from /etc/hosts
for ChangeLog * nss/nss_files/files-hosts.c (LINE_PARSER): Drop family conversion of loopback addresses from IPv6 to IPv4.
This commit is contained in:
parent
901aad32ed
commit
2e8a3341f4
@ -68,11 +68,6 @@ LINE_PARSER
|
||||
{
|
||||
if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
|
||||
memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
|
||||
else if (IN6_IS_ADDR_LOOPBACK (entdata->host_addr))
|
||||
{
|
||||
in_addr_t localhost = htonl (INADDR_LOOPBACK);
|
||||
memcpy (entdata->host_addr, &localhost, sizeof (localhost));
|
||||
}
|
||||
else
|
||||
/* Illegal address: ignore line. */
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user