]> git.proxmox.com Git - mirror_frr.git/commitdiff
Pimd : S,G Mroute entries are not expiring even after KAT expiry,
authorrgirada <rgirada@vmware.com>
Fri, 3 May 2019 17:35:48 +0000 (10:35 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 May 2019 20:26:11 +0000 (16:26 -0400)
       become stale entries.

Topology:
--------
Source
|
FHR
|
RP ------ LHR --- Recv1
|
Recv2

Root case :
-----------
When RP acts as a LHR i.e RP has a local receiver and registed for
the same group where LHR connected receiver also registered for the
same multicast group.When RP receives a (s,g) join form LHR , it
increments upstream ref count to two to track the Local membership
as well.But at the time of KAT expiry in RP , upstream reference
is not being removed Which is added to track local membership which
is causing to make these entries as stale in RP and FHR.

Fix : Made the change such that it removes the upstream reference
if it is added to track the local memberships.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
pimd/pim_upstream.c

index b708e86a2050891625ab06f6a1c44e4beed6d5a7..d829d01347e4e613b78ac3a30d99851d62bc28f8 100644 (file)
@@ -1181,8 +1181,16 @@ struct pim_upstream *pim_upstream_keep_alive_timer_proc(
                                "kat expired on %s[%s]; remove stream reference",
                                up->sg_str, pim->vrf->name);
                PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM(up->flags);
-               up = pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
-       } else if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(up->flags)) {
+
+               /* Return if upstream entry got deleted.*/
+               if (!pim_upstream_del(pim, up, __PRETTY_FUNCTION__))
+                       return NULL;
+       }
+       /* upstream reference would have been added to track the local
+        * membership if it is LHR. We have to clear it when KAT expires.
+        * Otherwise would result in stale entry with uncleared ref count.
+        */
+       if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(up->flags)) {
                struct pim_upstream *parent = up->parent;
 
                PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(up->flags);