svn commit: r206454 - head/sys/netinet6
Bruce M Simpson
bms at FreeBSD.org
Sat Apr 10 12:24:22 UTC 2010
Author: bms
Date: Sat Apr 10 12:24:21 2010
New Revision: 206454
URL: http://svn.freebsd.org/changeset/base/206454
Log:
When embedding the scope ID in MLDv1 output, check if the scope of the address
being embedded is in fact link-local, before attempting to embed it.
Note that this operation is a side-effect of trying to avoid recursion on
the IN6 scope lock.
PR: 144560
Submitted by: Petr Lampa
MFC after: 3 days
Modified:
head/sys/netinet6/mld6.c
Modified: head/sys/netinet6/mld6.c
==============================================================================
--- head/sys/netinet6/mld6.c Sat Apr 10 12:10:11 2010 (r206453)
+++ head/sys/netinet6/mld6.c Sat Apr 10 12:24:21 2010 (r206454)
@@ -195,8 +195,10 @@ static int sysctl_mld_ifinfo(SYSCTL_HAND
static struct mtx mld_mtx;
MALLOC_DEFINE(M_MLD, "mld", "mld state");
-#define MLD_EMBEDSCOPE(pin6, zoneid) \
- (pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF)
+#define MLD_EMBEDSCOPE(pin6, zoneid) \
+ if (IN6_IS_SCOPE_LINKLOCAL(pin6) || \
+ IN6_IS_ADDR_MC_INTFACELOCAL(pin6)) \
+ (pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF) \
/*
* VIMAGE-wide globals.
More information about the svn-src-all
mailing list