]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM
authorAbhishek N R <abnr@vmware.com>
Wed, 13 Apr 2022 08:00:50 +0000 (01:00 -0700)
committerAbhishek N R <abnr@vmware.com>
Wed, 13 Apr 2022 08:19:03 +0000 (01:19 -0700)
Modified marco name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
pimd/pim_cmd.c
pimd/pim_cmd_common.c
pimd/pim_ifchannel.c
pimd/pim_mroute.c
pimd/pim_oil.h
pimd/pim_tib.c
pimd/pim_upstream.c
pimd/pim_zebra.c

index da4069abb3584fcff35c9dc4ae5b81bbb505362d..ad5194a95310d66b51f83867189d7f1258b0a0a8 100644 (file)
@@ -4065,8 +4065,8 @@ static void show_mroute(struct pim_instance *pim, struct vty *vty,
                                        json_object_boolean_true_add(
                                                json_ifp_out, "protocolPim");
 
-                               if (c_oil->oif_flags[oif_vif_index]
-                                   & PIM_OIF_FLAG_PROTO_IGMP)
+                               if (c_oil->oif_flags[oif_vif_index] &
+                                   PIM_OIF_FLAG_PROTO_GM)
                                        json_object_boolean_true_add(
                                                json_ifp_out, "protocolIgmp");
 
@@ -4110,8 +4110,8 @@ static void show_mroute(struct pim_instance *pim, struct vty *vty,
                                        strlcpy(proto, "PIM", sizeof(proto));
                                }
 
-                               if (c_oil->oif_flags[oif_vif_index]
-                                   & PIM_OIF_FLAG_PROTO_IGMP) {
+                               if (c_oil->oif_flags[oif_vif_index] &
+                                   PIM_OIF_FLAG_PROTO_GM) {
                                        strlcpy(proto, "IGMP", sizeof(proto));
                                }
 
index 0992a60de916d97e927672a6bc0b534d5d72db2c..b7da8481fe33c3e8d133efbcc6caab6b0f433327 100644 (file)
@@ -1166,7 +1166,7 @@ void pim_show_state(struct pim_instance *pim, struct vty *vty,
                                                out_ifname,
                                                (c_oil->oif_flags
                                                         [oif_vif_index] &
-                                                PIM_OIF_FLAG_PROTO_IGMP)
+                                                PIM_OIF_FLAG_PROTO_GM)
                                                        ? 'I'
                                                        : ' ',
                                                (c_oil->oif_flags
@@ -1194,7 +1194,7 @@ void pim_show_state(struct pim_instance *pim, struct vty *vty,
                                                out_ifname,
                                                (c_oil->oif_flags
                                                         [oif_vif_index] &
-                                                PIM_OIF_FLAG_PROTO_IGMP)
+                                                PIM_OIF_FLAG_PROTO_GM)
                                                        ? 'I'
                                                        : ' ',
                                                (c_oil->oif_flags
index 54cd824f9e500b4193a9388e0146098dbdc14de8..40aaf1877c5585dfde26a70f6f31fcb435b29231 100644 (file)
@@ -138,7 +138,7 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
        if (ch->upstream->channel_oil) {
                uint32_t mask = PIM_OIF_FLAG_PROTO_PIM;
                if (ch->upstream->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
-                       mask |= PIM_OIF_FLAG_PROTO_IGMP;
+                       mask |= PIM_OIF_FLAG_PROTO_GM;
 
                /*
                 * A S,G RPT channel can have an empty oil, we also
@@ -1227,14 +1227,13 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, pim_sgaddr *sg,
                                    == PREFIX_DENY) {
                                        pim_channel_add_oif(
                                                up->channel_oil, pim->regiface,
-                                               PIM_OIF_FLAG_PROTO_IGMP,
+                                               PIM_OIF_FLAG_PROTO_GM,
                                                __func__);
                                }
                        }
                } else
                        pim_channel_add_oif(up->channel_oil, pim->regiface,
-                                       PIM_OIF_FLAG_PROTO_IGMP,
-                                       __func__);
+                                           PIM_OIF_FLAG_PROTO_GM, __func__);
        }
 
        return 1;
index 3015c4a61bc2f8cca869b1cbc1e395c75e23ba2c..43d05dfe9c092ae8914468412011630ef27614e1 100644 (file)
@@ -739,8 +739,8 @@ bool pim_mroute_allow_iif_in_oil(struct channel_oil *c_oil,
        pim_ifp = ifp_out->info;
        if (!pim_ifp)
                return false;
-       if ((c_oil->oif_flags[oif_index] & PIM_OIF_FLAG_PROTO_IGMP) &&
-                       PIM_I_am_DR(pim_ifp))
+       if ((c_oil->oif_flags[oif_index] & PIM_OIF_FLAG_PROTO_GM) &&
+           PIM_I_am_DR(pim_ifp))
                return true;
 
        return false;
index 21047177ea7ba6cb40ee410e9fd200dab8132771..eed4b203cd627818fa26b8bbfe9e664b177085eb 100644 (file)
@@ -27,18 +27,18 @@ struct pim_interface;
 /*
  * Where did we get this (S,G) from?
  *
- * IGMP - Learned from IGMP
+ * GM - Learned from IGMP/MLD
  * PIM - Learned from PIM
  * SOURCE - Learned from Source multicast packet received
  * STAR - Inherited
  */
-#define PIM_OIF_FLAG_PROTO_IGMP   (1 << 0)
+#define PIM_OIF_FLAG_PROTO_GM     (1 << 0)
 #define PIM_OIF_FLAG_PROTO_PIM    (1 << 1)
 #define PIM_OIF_FLAG_PROTO_STAR   (1 << 2)
 #define PIM_OIF_FLAG_PROTO_VXLAN  (1 << 3)
-#define PIM_OIF_FLAG_PROTO_ANY                                 \
-       (PIM_OIF_FLAG_PROTO_IGMP | PIM_OIF_FLAG_PROTO_PIM      \
-        PIM_OIF_FLAG_PROTO_STAR | PIM_OIF_FLAG_PROTO_VXLAN)
+#define PIM_OIF_FLAG_PROTO_ANY                                                 \
+       (PIM_OIF_FLAG_PROTO_GM | PIM_OIF_FLAG_PROTO_PIM |                      \
+        PIM_OIF_FLAG_PROTO_STAR | PIM_OIF_FLAG_PROTO_VXLAN)
 
 /* OIF is present in the OIL but must not be used for forwarding traffic */
 #define PIM_OIF_FLAG_MUTE         (1 << 4)
index 838f11211e012136071c6b90b7e97ca32423e5b8..80e75f1b09f6bfc6aa588f1dfe4ea1b7880dcbc5 100644 (file)
@@ -110,8 +110,8 @@ bool tib_sg_gm_join(struct pim_instance *pim, pim_sgaddr sg,
        if (PIM_I_am_DR(pim_oif) || PIM_I_am_DualActive(pim_oif)) {
                int result;
 
-               result = pim_channel_add_oif(*oilp, oif,
-                                            PIM_OIF_FLAG_PROTO_IGMP, __func__);
+               result = pim_channel_add_oif(*oilp, oif, PIM_OIF_FLAG_PROTO_GM,
+                                            __func__);
                if (result) {
                        if (PIM_DEBUG_MROUTE)
                                zlog_warn("%s: add_oif() failed with return=%d",
@@ -136,7 +136,7 @@ bool tib_sg_gm_join(struct pim_instance *pim, pim_sgaddr sg,
                                "%s: Failure to add local membership for %pSG",
                                __func__, &sg);
 
-               pim_channel_del_oif(*oilp, oif, PIM_OIF_FLAG_PROTO_IGMP,
+               pim_channel_del_oif(*oilp, oif, PIM_OIF_FLAG_PROTO_GM,
                                    __func__);
                return false;
        }
@@ -160,7 +160,7 @@ void tib_sg_gm_prune(struct pim_instance *pim, pim_sgaddr sg,
         fixes the issue without ill effect, similar to
         pim_forward_stop below.
        */
-       result = pim_channel_del_oif(*oilp, oif, PIM_OIF_FLAG_PROTO_IGMP,
+       result = pim_channel_del_oif(*oilp, oif, PIM_OIF_FLAG_PROTO_GM,
                                     __func__);
        if (result) {
                if (PIM_DEBUG_IGMP_TRACE)
index af1254f7910224cb63ee3a9efd84572bc54c90a1..c38acc485f078f022f0b78f4b6939de6a4e90080 100644 (file)
@@ -1838,7 +1838,7 @@ int pim_upstream_inherited_olist_decide(struct pim_instance *pim,
                                flag = PIM_OIF_FLAG_PROTO_STAR;
                        else {
                                if (PIM_IF_FLAG_TEST_PROTO_IGMP(ch->flags))
-                                       flag = PIM_OIF_FLAG_PROTO_IGMP;
+                                       flag = PIM_OIF_FLAG_PROTO_GM;
                                if (PIM_IF_FLAG_TEST_PROTO_PIM(ch->flags))
                                        flag |= PIM_OIF_FLAG_PROTO_PIM;
                                if (starch)
@@ -2116,7 +2116,7 @@ void pim_upstream_add_lhr_star_pimreg(struct pim_instance *pim)
                        continue;
 
                pim_channel_add_oif(up->channel_oil, pim->regiface,
-                                   PIM_OIF_FLAG_PROTO_IGMP, __func__);
+                                   PIM_OIF_FLAG_PROTO_GM, __func__);
        }
 }
 
@@ -2161,18 +2161,17 @@ void pim_upstream_remove_lhr_star_pimreg(struct pim_instance *pim,
 
                if (!nlist) {
                        pim_channel_del_oif(up->channel_oil, pim->regiface,
-                                       PIM_OIF_FLAG_PROTO_IGMP, __func__);
+                                           PIM_OIF_FLAG_PROTO_GM, __func__);
                        continue;
                }
                pim_addr_to_prefix(&g, up->sg.grp);
                apply_new = prefix_list_apply(np, &g);
                if (apply_new == PREFIX_DENY)
                        pim_channel_add_oif(up->channel_oil, pim->regiface,
-                                           PIM_OIF_FLAG_PROTO_IGMP,
-                                               __func__);
+                                           PIM_OIF_FLAG_PROTO_GM, __func__);
                else
                        pim_channel_del_oif(up->channel_oil, pim->regiface,
-                                       PIM_OIF_FLAG_PROTO_IGMP, __func__);
+                                           PIM_OIF_FLAG_PROTO_GM, __func__);
        }
 }
 
index 4bed8d5b7389144c5fcbb3411c2b7d7324877337..4135ae040867d410216864080598b5cdc16a23da 100644 (file)
@@ -499,7 +499,7 @@ void pim_forward_start(struct pim_ifchannel *ch)
                           ch->interface->name, &up->upstream_addr);
 
        if (PIM_IF_FLAG_TEST_PROTO_IGMP(ch->flags))
-               mask = PIM_OIF_FLAG_PROTO_IGMP;
+               mask = PIM_OIF_FLAG_PROTO_GM;
 
        if (PIM_IF_FLAG_TEST_PROTO_PIM(ch->flags))
                mask |= PIM_OIF_FLAG_PROTO_PIM;