From 5428f5ac64e531c854e9197a2c733d0c2c6ec303 Mon Sep 17 00:00:00 2001 From: Mobashshera Rasool Date: Fri, 29 Oct 2021 02:22:13 -0700 Subject: [PATCH] pimd: STAR inherited Flag not properly set in certain scenarios Problem Statement: ================== Mroutes are not recovered after shut/no shut of DUT to RP links One interface is not added in OIL List in intermediate router, hence traffic never received at LHR and mroutes not created for (S,G). Root Cause Analysis: ==================== Generally (*,G) PIM Join is received first and then (S,G) joins are received. This issue occurs when (S,G) join comes first and then the (*,G) Join. When (S,G) PIM Join is received, ifchannel is created and channel_oil OIF flag is set to PIM_OIF_FLAG_PROTO_PIM. Now when (*,G) join is received the flag PIM_OIF_FLAG_PROTO_STAR is not inherited due to wrong check present in function pim_upstream_inherited_olist_decide. Fix: =================== When (*,G) PIM Join is received, it should always add PIM_OIF_FLAG_PROTO_STAR flag for all the (S,G) channel oils no matter what order the (*,G) or (S,G) is received. Fixes: #9918 Signed-off-by: Mobashshera Rasool --- pimd/pim_upstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index d21c7b4008..b9cddd74f2 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1865,6 +1865,8 @@ int pim_upstream_inherited_olist_decide(struct pim_instance *pim, flag = PIM_OIF_FLAG_PROTO_IGMP; if (PIM_IF_FLAG_TEST_PROTO_PIM(ch->flags)) flag |= PIM_OIF_FLAG_PROTO_PIM; + if (starch) + flag |= PIM_OIF_FLAG_PROTO_STAR; } pim_channel_add_oif(up->channel_oil, ifp, flag,