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
This commit is contained in:
Bruce M Simpson
2010-04-10 12:24:21 +00:00
parent 89fcb8cfa7
commit f1014c074d
+3 -1
View File
@@ -196,7 +196,9 @@ static struct mtx mld_mtx;
MALLOC_DEFINE(M_MLD, "mld", "mld state"); MALLOC_DEFINE(M_MLD, "mld", "mld state");
#define MLD_EMBEDSCOPE(pin6, zoneid) \ #define MLD_EMBEDSCOPE(pin6, zoneid) \
(pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF) if (IN6_IS_SCOPE_LINKLOCAL(pin6) || \
IN6_IS_ADDR_MC_INTFACELOCAL(pin6)) \
(pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF) \
/* /*
* VIMAGE-wide globals. * VIMAGE-wide globals.