]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: (*,G) Prune processing doesn't remove SGRpt ifchannel 7404/head
authorvdhingra <vdhingra@vmware.com>
Wed, 28 Oct 2020 14:32:00 +0000 (07:32 -0700)
committervdhingra <vdhingra@vmware.com>
Mon, 2 Nov 2020 09:06:59 +0000 (01:06 -0800)
problem :
=========
When (*,G) prune received where we have SGRpt state,
ifchannel goes to NO_INFO state and doesn't get removed.

Root cause :
============
During the processing of (*,G) prune, we are not removing the
ifchannel on PruneTmp or PrunePendingTmp state.

Fix :
=====
In that scenario, stop joinExpiry timer and delete the ifchannel.

issue #7347

Co-authored-by: Saravanan K <saravanank@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
pimd/pim_ifchannel.c
pimd/pim_ifchannel.h
pimd/pim_join.c

index b2971e5f1feb6bc124fe088c617f111e2c75b04d..e7ff434f4b2f952f989e5def66958d60b3556991 100644 (file)
@@ -258,7 +258,7 @@ void pim_ifchannel_delete_all(struct interface *ifp)
        }
 }
 
-static void delete_on_noinfo(struct pim_ifchannel *ch)
+void delete_on_noinfo(struct pim_ifchannel *ch)
 {
        if (ch->local_ifmembership == PIM_IFMEMBERSHIP_NOINFO
            && ch->ifjoin_state == PIM_IFJOIN_NOINFO
index 425622b79ed3b8afd04065cf19253f4a20a7fbd2..7ec8191e568704d07f42277194405b8a42c60b05 100644 (file)
@@ -173,4 +173,5 @@ int pim_ifchannel_compare(const struct pim_ifchannel *ch1,
                          const struct pim_ifchannel *ch2);
 
 unsigned int pim_ifchannel_hash_key(const void *arg);
+void delete_on_noinfo(struct pim_ifchannel *ch);
 #endif /* PIM_IFCHANNEL_H */
index f54d5bf9bfe48b448cc4f40a7473566518e296bd..2766a6d2b51e9d5e0c376c2b8cf0dec48bb3c810 100644 (file)
@@ -350,8 +350,11 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
                                            == PIM_IFJOIN_PRUNE_PENDING_TMP)
                                                THREAD_OFF(
                                                        child->t_ifjoin_prune_pending_timer);
+                                       THREAD_OFF(
+                                               child->t_ifjoin_expiry_timer);
                                        PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
                                        child->ifjoin_state = PIM_IFJOIN_NOINFO;
+                                       delete_on_noinfo(child);
                                }
                        }