summaryrefslogtreecommitdiff
path: root/pimd/pim_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_zebra.c')
-rw-r--r--pimd/pim_zebra.c64
1 files changed, 22 insertions, 42 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 25ac307ac4..2c814d0fdc 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -974,18 +974,8 @@ void igmp_source_forward_start(struct pim_instance *pim,
if (!pim_rp_set_upstream_addr(pim, &vif_source,
source->source_addr, sg.grp)) {
/*Create a dummy channel oil */
- source->source_channel_oil =
- pim_channel_oil_add(pim, &sg, MAXVIFS);
-
- if (!source->source_channel_oil) {
- if (PIM_DEBUG_IGMP_TRACE) {
- zlog_debug(
- "%s %s: could not create OIL for channel (S,G)=%s",
- __FILE__, __PRETTY_FUNCTION__,
- pim_str_sg_dump(&sg));
- }
- return;
- }
+ source->source_channel_oil = pim_channel_oil_add(
+ pim, &sg, MAXVIFS, __PRETTY_FUNCTION__);
}
else {
@@ -1035,7 +1025,9 @@ void igmp_source_forward_start(struct pim_instance *pim,
source_str);
}
source->source_channel_oil =
- pim_channel_oil_add(pim, &sg, MAXVIFS);
+ pim_channel_oil_add(
+ pim, &sg, MAXVIFS,
+ __PRETTY_FUNCTION__);
}
else {
@@ -1043,10 +1035,12 @@ void igmp_source_forward_start(struct pim_instance *pim,
* Protect IGMP against adding looped MFC
* entries created by both source and receiver
* attached to the same interface. See TODO
- * T22.
+ * T22. Block only when the intf is non DR
+ * DR must create upstream.
*/
- if (input_iface_vif_index ==
- pim_oif->mroute_vif_index) {
+ if ((input_iface_vif_index ==
+ pim_oif->mroute_vif_index) &&
+ !(PIM_I_am_DR(pim_oif))) {
/* ignore request for looped MFC entry
*/
if (PIM_DEBUG_IGMP_TRACE) {
@@ -1065,8 +1059,9 @@ void igmp_source_forward_start(struct pim_instance *pim,
}
source->source_channel_oil =
- pim_channel_oil_add(pim, &sg,
- input_iface_vif_index);
+ pim_channel_oil_add(
+ pim, &sg, input_iface_vif_index,
+ __PRETTY_FUNCTION__);
if (!source->source_channel_oil) {
if (PIM_DEBUG_IGMP_TRACE) {
zlog_debug(
@@ -1241,22 +1236,14 @@ void pim_forward_start(struct pim_ifchannel *ch)
__FILE__, __PRETTY_FUNCTION__,
source_str);
}
- up->channel_oil = pim_channel_oil_add(pim, &up->sg,
- MAXVIFS);
+ up->channel_oil = pim_channel_oil_add(
+ pim, &up->sg, MAXVIFS, __PRETTY_FUNCTION__);
}
- else {
- up->channel_oil = pim_channel_oil_add(pim, &up->sg,
- input_iface_vif_index);
- if (!up->channel_oil) {
- if (PIM_DEBUG_PIM_TRACE)
- zlog_debug(
- "%s %s: could not create OIL for channel (S,G)=%s",
- __FILE__, __PRETTY_FUNCTION__,
- up->sg_str);
- return;
- }
- }
+ else
+ up->channel_oil = pim_channel_oil_add(
+ pim, &up->sg, input_iface_vif_index,
+ __PRETTY_FUNCTION__);
if (PIM_DEBUG_TRACE) {
struct interface *in_intf = pim_if_find_by_vif_index(
@@ -1268,16 +1255,9 @@ void pim_forward_start(struct pim_ifchannel *ch)
input_iface_vif_index, up->sg_str);
}
- up->channel_oil = pim_channel_oil_add(pim, &up->sg,
- input_iface_vif_index);
- if (!up->channel_oil) {
- if (PIM_DEBUG_PIM_TRACE)
- zlog_debug(
- "%s %s: could not create OIL for channel (S,G)=%s",
- __FILE__, __PRETTY_FUNCTION__,
- up->sg_str);
- return;
- }
+ up->channel_oil =
+ pim_channel_oil_add(pim, &up->sg, input_iface_vif_index,
+ __PRETTY_FUNCTION__);
}
if (up->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)