aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/net/name6.c
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>2000-01-13 05:47:11 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>2000-01-13 05:47:11 +0000
commit3d670abcc1bce8952ccc4a9e78c5d0f8e8a4fbb7 (patch)
treecfa139f3defda385d4de0d83ee15ec6dcecc6d00 /lib/libc/net/name6.c
parent3a0c1bfb5d1db1183eb77a8764382ed081fc1b71 (diff)
downloadsrc-3d670abcc1bce8952ccc4a9e78c5d0f8e8a4fbb7.tar.gz
src-3d670abcc1bce8952ccc4a9e78c5d0f8e8a4fbb7.zip
added IPv6 unspecified addr check for getipnodebyaddr.
Notes
Notes: svn path=/head/; revision=55877
Diffstat (limited to 'lib/libc/net/name6.c')
-rw-r--r--lib/libc/net/name6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 2f83d1c070d0..e3ddf3ec14cd 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -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 +