diff options
author | ume <ume@FreeBSD.org> | 2015-12-12 14:42:50 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2015-12-12 14:42:50 +0000 |
commit | 2b36705452063b0e71d9d9ce3102c9c065f34fe1 (patch) | |
tree | e0f6b4e91a09654866642417a4b859bfbc235eee /lib/libc/net | |
parent | 0a99daba3bbf9e22d62b25b9d4b788f0424667d4 (diff) | |
download | FreeBSD-src-2b36705452063b0e71d9d9ce3102c9c065f34fe1.zip FreeBSD-src-2b36705452063b0e71d9d9ce3102c9c065f34fe1.tar.gz |
RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.
Since it breaks certain jail setup, we ignore just 127.0.0.1
instead of whole loopback address range.
PR: 192014
Reviewed by: hrs
MFC after: 1 week
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 2117370..ab6b65f 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1563,7 +1563,7 @@ addrconfig(struct addrinfo *pai) if (seen_inet) continue; sin = (struct sockaddr_in *)(ifa->ifa_addr); - if (IN_LOOPBACK(htonl(sin->sin_addr.s_addr))) + if (htonl(sin->sin_addr.s_addr) == INADDR_LOOPBACK) continue; seen_inet = 1; break; |