diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2019-11-14 09:38:44 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-14 09:38:44 -0600 |
| commit | 48cb555d4e300f1cb80b81ed6aff1e2e23e4f723 (patch) | |
| tree | 81057e85cb8fc2887c660f7e5f3d54815befe7f7 /pimd/pim_zebra.c | |
| parent | 53d19f2d6e45f5e00c2b147fe08bc0e39e8e358c (diff) | |
| parent | 8e389ea9e8791581df1672602469c8a5ffebc24c (diff) | |
Merge pull request #5276 from donaldsharp/pim_double
pimd: No need to add then remove the oif if not DR
Diffstat (limited to 'pimd/pim_zebra.c')
| -rw-r--r-- | pimd/pim_zebra.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index dfddee99d0..b297615435 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -855,27 +855,24 @@ void igmp_source_forward_start(struct pim_instance *pim, } } - result = pim_channel_add_oif(source->source_channel_oil, - group->group_igmp_sock->interface, - PIM_OIF_FLAG_PROTO_IGMP); - if (result) { - if (PIM_DEBUG_MROUTE) { - zlog_warn("%s: add_oif() failed with return=%d", - __func__, result); + if (PIM_I_am_DR(pim_oif)) { + result = pim_channel_add_oif(source->source_channel_oil, + group->group_igmp_sock->interface, + PIM_OIF_FLAG_PROTO_IGMP); + if (result) { + if (PIM_DEBUG_MROUTE) { + zlog_warn("%s: add_oif() failed with return=%d", + __func__, result); + } + return; } - return; - } - - if (!(PIM_I_am_DR(pim_oif))) { + } else { if (PIM_DEBUG_IGMP_TRACE) zlog_debug("%s: %s was received on %s interface but we are not DR for that interface", __PRETTY_FUNCTION__, pim_str_sg_dump(&sg), group->group_igmp_sock->interface->name); - pim_channel_del_oif(source->source_channel_oil, - group->group_igmp_sock->interface, - PIM_OIF_FLAG_PROTO_IGMP); return; } /* |
