]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Allow installation of NULL mroute in some situations
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 10 Jul 2017 13:45:04 +0000 (09:45 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:52:57 +0000 (13:52 -0400)
When we receive a S,G,RPT prune as part of a *,G tree, install
the NULL oil S,G mroute.  This will cause the traffic to stop
flowing for this particular S,G as we expect.

Ticket: CM-16978
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_ifchannel.c
pimd/pim_upstream.c
pimd/pim_zebra.c
pimd/pim_zebra.h

index afd9aa477985feaba842b0c182f5713d299b853b..0ee887f8401c1071916f951dad44dfe57cd245ae 100644 (file)
@@ -613,7 +613,7 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp,
 
 static void ifjoin_to_noinfo(struct pim_ifchannel *ch, bool ch_del)
 {
-       pim_forward_stop(ch);
+       pim_forward_stop(ch, !ch_del);
        pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch, PIM_IFJOIN_NOINFO);
        if (ch_del)
                delete_on_noinfo(ch);
index 9151d9ecf3ff6f7c7a9e5f68b9ca9bf76789896c..433ba5ee95eddea0a1e394bba30f299df30a3e2c 100644 (file)
@@ -443,7 +443,7 @@ static void forward_off(struct pim_upstream *up)
        /* scan per-interface (S,G) state */
        for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
 
-               pim_forward_stop(ch);
+               pim_forward_stop(ch, false);
 
        } /* scan iface channel list */
 }
index 9fbca9cb217c3707f8b726c877e831135232338e..7b060aef4b6d5e06fe6deec7b3af688188ad2867 100644 (file)
@@ -1284,17 +1284,21 @@ void pim_forward_start(struct pim_ifchannel *ch)
        pim_channel_add_oif(up->channel_oil, ch->interface, mask);
 }
 
-void pim_forward_stop(struct pim_ifchannel *ch)
+void pim_forward_stop(struct pim_ifchannel *ch, bool install_it)
 {
        struct pim_upstream *up = ch->upstream;
 
        if (PIM_DEBUG_PIM_TRACE) {
-               zlog_debug("%s: (S,G)=%s oif=%s", __PRETTY_FUNCTION__,
-                          ch->sg_str, ch->interface->name);
+               zlog_debug("%s: (S,G)=%s oif=%s install_it: %d installed: %d",
+                          __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name,
+                          install_it, up->channel_oil->installed);
        }
 
        pim_channel_del_oif(up->channel_oil, ch->interface,
                            PIM_OIF_FLAG_PROTO_PIM);
+
+       if (install_it && !up->channel_oil->installed)
+               pim_mroute_add(up->channel_oil, __PRETTY_FUNCTION__);
 }
 
 void pim_zebra_zclient_update(struct vty *vty)
index e8b6e1000e58509c458b9d90e7ed0f046dd0041b..d9b17cb82d00766db1f02f109a53aecda62952b7 100644 (file)
@@ -42,7 +42,7 @@ void igmp_source_forward_stop(struct igmp_source *source);
 void igmp_source_forward_reevaluate_all(void);
 
 void pim_forward_start(struct pim_ifchannel *ch);
-void pim_forward_stop(struct pim_ifchannel *ch);
+void pim_forward_stop(struct pim_ifchannel *ch, bool install_it);
 
 void sched_rpf_cache_refresh(void);
 struct zclient *pim_zebra_zclient_get(void);