added IPv6 unspecified addr check for getipnodebyaddr.

This commit is contained in:
shin 2000-01-13 05:47:11 +00:00
parent 25da29b5d5
commit 8c63714cb8

View File

@ -369,6 +369,8 @@ getipnodebyaddr(const void *src, size_t len, int af, int *errp)
memcpy(&addrbuf, src, len);
src = &addrbuf;
}
if (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *)src))
return NULL;
if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)src)
|| IN6_IS_ADDR_V4COMPAT((struct in6_addr *)src)) {
src = (char *)src +