Summary: | getaddrinfo() with AI_ADDRCONFIG may fail to properly resolve /etc/hosts names, e.g. "localhost" | ||
---|---|---|---|
Product: | glibc | Reporter: | Pavel Šimerda <psimerda> |
Component: | network | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | fweimer |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.15 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Pavel Šimerda
2012-12-16 15:51:36 UTC
> AI_ADDRCONFIG may cause getaddrinfo() to filter out IPv4 or IPv6 addresses,
> depending on the network configuration. Detailed info here:
Of course I meant addresses from /etc/hosts.
In many cases, having localhost point to both IPv4 and IPv6 addesses can serve as a workaround: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ... |