Modified marco name so that it can be reused in mld.
Signed-off-by: Abhishek N R <abnr@vmware.com>
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");
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));
}
out_ifname,
(c_oil->oif_flags
[oif_vif_index] &
- PIM_OIF_FLAG_PROTO_IGMP)
+ PIM_OIF_FLAG_PROTO_GM)
? 'I'
: ' ',
(c_oil->oif_flags
out_ifname,
(c_oil->oif_flags
[oif_vif_index] &
- PIM_OIF_FLAG_PROTO_IGMP)
+ PIM_OIF_FLAG_PROTO_GM)
? 'I'
: ' ',
(c_oil->oif_flags
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
== 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;
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;
/*
* 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)
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",
"%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;
}
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)
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)
continue;
pim_channel_add_oif(up->channel_oil, pim->regiface,
- PIM_OIF_FLAG_PROTO_IGMP, __func__);
+ PIM_OIF_FLAG_PROTO_GM, __func__);
}
}
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__);
}
}
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;