]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet6/mld6.c
xnu-3789.60.24.tar.gz
[apple/xnu.git] / bsd / netinet6 / mld6.c
index 228767199452c2d0559175ebd7ecc7b7ded93664..6cbcaef13458e72016e233a02904dc496529e128 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -1219,7 +1219,6 @@ mld_v2_process_group_query(struct in6_multi *inm, int timer, struct mbuf *m0,
        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:
@@ -2312,16 +2311,20 @@ mld_initial_join(struct in6_multi *inm, struct mld_ifinfo *mli,
        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__));
@@ -3612,22 +3615,16 @@ mld_rec_type_to_str(const int type)
        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;
        }