/*
- * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
case MLD_IDLE_MEMBER:
case MLD_LEAVING_MEMBER:
return (retval);
- break;
case MLD_REPORTING_MEMBER:
case MLD_G_QUERY_PENDING_MEMBER:
case MLD_SG_QUERY_PENDING_MEMBER:
interface_timers_running6 = 0;
LIST_FOREACH(mli, &mli_head, mli_link) {
MLI_LOCK(mli);
+ if (mli->mli_version != MLD_VERSION_2) {
+ MLI_UNLOCK(mli);
+ continue;
+ }
if (mli->mli_v2_timer == 0) {
/* Do nothing. */
} else if (--mli->mli_v2_timer == 0) {
VERIFY(mli->mli_ifp == ifp);
/*
- * Groups joined on loopback or marked as 'not reported',
- * enter the MLD_SILENT_MEMBER state and
- * are never reported in any protocol exchanges.
+ * Avoid MLD if group is :
+ * 1. Joined on loopback, OR
+ * 2. On a link that is marked MLIF_SILENT
+ * 3. rdar://problem/19227650 Is link local scoped and
+ * on cellular interface
+ * 4. Is a type that should not be reported (node local
+ * or all node link local multicast.
* All other groups enter the appropriate state machine
* for the version in use on this link.
- * A link marked as MLIF_SILENT causes MLD to be completely
- * disabled for the link.
*/
if ((ifp->if_flags & IFF_LOOPBACK) ||
(mli->mli_flags & MLIF_SILENT) ||
+ (IFNET_IS_CELLULAR(ifp) &&
+ IN6_IS_ADDR_MC_LINKLOCAL(&inm->in6m_addr)) ||
!mld_is_addr_reported(&inm->in6m_addr)) {
MLD_PRINTF(("%s: not kicking state machine for silent group\n",
__func__));
MLI_UNLOCK(mli);
retval *= -1;
goto done;
+ } else {
+ retval = 0;
}
+
/*
* If record(s) were enqueued, start the state-change
* report timer for this group.
}
im6o->im6o_multicast_hlim = 1;
-#if MROUTING
- im6o->im6o_multicast_loop = (ip6_mrouter != NULL);
-#else
im6o->im6o_multicast_loop = 0;
-#endif
im6o->im6o_multicast_ifp = ifp;
if (m->m_flags & M_MLDV1) {
switch (type) {
case MLD_CHANGE_TO_EXCLUDE_MODE:
return "TO_EX";
- break;
case MLD_CHANGE_TO_INCLUDE_MODE:
return "TO_IN";
- break;
case MLD_MODE_IS_EXCLUDE:
return "MODE_EX";
- break;
case MLD_MODE_IS_INCLUDE:
return "MODE_IN";
- break;
case MLD_ALLOW_NEW_SOURCES:
return "ALLOW_NEW";
- break;
case MLD_BLOCK_OLD_SOURCES:
return "BLOCK_OLD";
- break;
default:
break;
}