]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Update state when receiving S,G join when in S,G RPT Prune state
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 8 Apr 2019 18:37:00 +0000 (14:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 9 Apr 2019 17:17:56 +0000 (13:17 -0400)
When we receive a S,G join and the ifchannel is in S,G RPT Prune state,
pim should transition the ifchannel state to JOIN and transition the
pim_upstream state for the S,G stream.

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

index 980b4c1428b56fab99dafc702109a07b88fefccd..cbc3c6a640c747b9a94731192e4b9763983f0ab5 100644 (file)
@@ -871,6 +871,25 @@ void pim_ifchannel_join_add(struct interface *ifp, struct in_addr neigh_addr,
                if (source_flags & PIM_ENCODE_RPT_BIT)
                        pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
                                                    PIM_IFJOIN_NOINFO);
+               else {
+                       /*
+                        * We have received a S,G join and we are in
+                        * S,G RPT Prune state.  Which means we need
+                        * to transition to Join state and setup
+                        * state as appropriate.
+                        */
+                       pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, ch,
+                                                   PIM_IFJOIN_JOIN);
+                       PIM_IF_FLAG_UNSET_S_G_RPT(ch->flags);
+                       if (pim_upstream_evaluate_join_desired(pim_ifp->pim,
+                                                              ch->upstream)) {
+                               pim_channel_add_oif(ch->upstream->channel_oil,
+                                                   ch->interface,
+                                                   PIM_OIF_FLAG_PROTO_PIM);
+                               pim_upstream_update_join_desired(pim_ifp->pim,
+                                                                ch->upstream);
+                       }
+               }
                break;
        case PIM_IFJOIN_PRUNE_PENDING:
                THREAD_OFF(ch->t_ifjoin_prune_pending_timer);