Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 2010 13:27:51 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r207273 - stable/8/sys/netinet6
Message-ID:  <201004271327.o3RDRq4D020768@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004271327.o3RDRq4D020768>