diff options
author | 2002-05-18 00:06:42 +0000 | |
---|---|---|
committer | 2002-05-18 00:06:42 +0000 | |
commit | f02bfbdbb8db83dbbbef745139041e35a50f3f09 (patch) | |
tree | 7e69c59199a228228b7f49635dd730149d91c361 | |
parent | Bump the version number to reflect the latest MS-CHAP2 changes (diff) | |
download | wireguard-openbsd-f02bfbdbb8db83dbbbef745139041e35a50f3f09.tar.xz wireguard-openbsd-f02bfbdbb8db83dbbbef745139041e35a50f3f09.zip |
do not reverse-lookup scoped ipv6 address - it is meaningless as there's
no way to pass scope id. sync w/kame
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index 9061caf0c23..a0bee88a6df 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.45 2002/02/17 19:42:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.46 2002/05/18 00:06:42 itojun Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -677,6 +677,12 @@ gethostbyaddr(addr, len, af) } if (af == AF_INET6 && len == IN6ADDRSZ && + (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)uaddr) || + IN6_IS_ADDR_SITELOCAL((struct in6_addr *)uaddr))) { + h_errno = HOST_NOT_FOUND; + return (NULL); + } + if (af == AF_INET6 && len == IN6ADDRSZ && (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)uaddr) || IN6_IS_ADDR_V4COMPAT((struct in6_addr *)uaddr))) { /* Unmap. */ |