From fb2f5b33d86a82f2e5cd856a4d82312f73b9e357 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Thu, 6 Nov 2003 06:18:21 +0000 Subject: fix linklocal multicast address handling. Matthias Drochner --- usr.bin/netstat/inet6.c | 7 ++++--- 1 file 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; -- cgit v1.2.3