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
This commit is contained in:
Hajimu UMEMOTO 2015-12-12 14:42:50 +00:00
parent d5f998ba70
commit ea24ff4734

View File

@ -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;