summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-07-23 22:50:59 +0200
committerGitHub <noreply@github.com>2018-07-23 22:50:59 +0200
commitb6292a289b4569d839395962a4176f958f5acdab (patch)
treee7dbb0640a9cad2ce5c6d8a83aad9bef82a91f4a /pimd
parentMerge pull request #2668 from dslicenc/cm21722-v6-vrf-display (diff)
parentpimd: Do not create upstream state when not DR for igmp request (diff)
downloadfrr-b6292a289b4569d839395962a4176f958f5acdab.tar.xz
frr-b6292a289b4569d839395962a4176f958f5acdab.zip
Merge pull request #2641 from donaldsharp/pim_igmp_dr
pimd: Do not create upstream state when not DR for igmp request
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_zebra.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 38a29b72a..b947ca062 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -868,6 +868,7 @@ void igmp_source_forward_reevaluate_all(struct pim_instance *pim)
void igmp_source_forward_start(struct pim_instance *pim,
struct igmp_source *source)
{
+ struct pim_interface *pim_oif;
struct igmp_group *group;
struct prefix_sg sg;
int result;
@@ -893,10 +894,20 @@ void igmp_source_forward_start(struct pim_instance *pim,
}
group = source->source_group;
+ pim_oif = group->group_igmp_sock->interface->info;
+ if (!pim_oif) {
+ if (PIM_DEBUG_IGMP_TRACE) {
+ zlog_debug(
+ "%s: multicast not enabled on oif=%s ?",
+ __PRETTY_FUNCTION__,
+ source->source_group->group_igmp_sock
+ ->interface->name);
+ }
+ return;
+ }
if (!source->source_channel_oil) {
struct in_addr vif_source;
- struct pim_interface *pim_oif;
struct prefix nht_p, src, grp;
struct pim_nexthop_cache out_pnc;
struct pim_nexthop nexthop;
@@ -983,19 +994,6 @@ void igmp_source_forward_start(struct pim_instance *pim,
source and receiver attached to the same interface. See TODO
T22.
*/
- pim_oif =
- source->source_group->group_igmp_sock->interface->info;
- if (!pim_oif) {
- if (PIM_DEBUG_IGMP_TRACE) {
- zlog_debug(
- "%s: multicast not enabled on oif=%s ?",
- __PRETTY_FUNCTION__,
- source->source_group->group_igmp_sock
- ->interface->name);
- }
- return;
- }
-
if (input_iface_vif_index == pim_oif->mroute_vif_index) {
/* ignore request for looped MFC entry */
if (PIM_DEBUG_IGMP_TRACE) {
@@ -1036,12 +1034,15 @@ void igmp_source_forward_start(struct pim_instance *pim,
return;
}
+ if (!(PIM_I_am_DR(pim_oif)))
+ return;
+
/*
Feed IGMPv3-gathered local membership information into PIM
per-interface (S,G) state.
*/
if (!pim_ifchannel_local_membership_add(
- group->group_igmp_sock->interface, &sg)) {
+ group->group_igmp_sock->interface, &sg)) {
if (PIM_DEBUG_MROUTE)
zlog_warn("%s: Failure to add local membership for %s",
__PRETTY_FUNCTION__, pim_str_sg_dump(&sg));