svn commit: r207273 - stable/8/sys/netinet6
Bruce M Simpson
bms at FreeBSD.org
Tue Apr 27 13:27:52 UTC 2010
Author: bms
Date: Tue Apr 27 13:27:51 2010
New Revision: 207273
URL: http://svn.freebsd.org/changeset/base/207273
Log:
MFC 206454:
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
Modified:
stable/8/sys/netinet6/mld6.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/netinet6/mld6.c
==============================================================================
--- stable/8/sys/netinet6/mld6.c Tue Apr 27 12:50:42 2010 (r207272)
+++ stable/8/sys/netinet6/mld6.c Tue Apr 27 13:27:51 2010 (r207273)
@@ -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-stable-8
mailing list