summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-11-06 06:18:21 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-11-06 06:18:21 +0000
commitfb2f5b33d86a82f2e5cd856a4d82312f73b9e357 (patch)
treed120207ae0ff6222dc984fd8796fb30b1f9f4059
parent86c9e6782529ebd08c11dbbbf63c3925fb324bc0 (diff)
fix linklocal multicast address handling. Matthias Drochner
-rw-r--r--usr.bin/netstat/inet6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 5bf57bad7fc..9fe478b453b 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet6.c,v 1.29 2003/06/03 02:56:13 millert Exp $ */
+/* $OpenBSD: inet6.c,v 1.30 2003/11/06 06:18:20 itojun Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94";
#else
-/*__RCSID("$OpenBSD: inet6.c,v 1.29 2003/06/03 02:56:13 millert Exp $");*/
+/*__RCSID("$OpenBSD: inet6.c,v 1.30 2003/11/06 06:18:20 itojun Exp $");*/
/*__RCSID("KAME Id: inet6.c,v 1.10 2000/02/09 10:49:31 itojun Exp");*/
#endif
#endif /* not lint */
@@ -1114,7 +1114,8 @@ inet6name(struct in6_addr *in6p)
sin6.sin6_family = AF_INET6;
sin6.sin6_addr = *in6p;
#ifdef __KAME__
- if (IN6_IS_ADDR_LINKLOCAL(in6p)) {
+ if (IN6_IS_ADDR_LINKLOCAL(in6p) ||
+ IN6_IS_ADDR_MC_LINKLOCAL(in6p)) {
sin6.sin6_scope_id =
ntohs(*(u_int16_t *)&in6p->s6_addr[2]);
sin6.sin6_addr.s6_addr[2] = 0;