From 8d90ffd05dd3bfb268e5d212d7f18c61eb3fa69a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 6 Dec 2016 13:52:14 -0500 Subject: [PATCH] pimd: Correctly associate channel oil with correct IIF There exists situations where PIM stores a S,G channel oil and doesn't delete it. When a new upstream comes in for it we were not ensuring that the IIF for the S,G channel oil was correct. Ticket: CM-13908 Signed-off-by: Donald Sharp --- pimd/pim_oil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index e002de0300..88ace45ed9 100644 --- a/pimd/pim_oil.c +++ b/pimd/pim_oil.c @@ -176,6 +176,11 @@ struct channel_oil *pim_channel_oil_add(struct prefix_sg *sg, c_oil = pim_find_channel_oil(sg); if (c_oil) { + if (c_oil->oil.mfcc_parent != input_vif_index) + if (PIM_DEBUG_MROUTE) + zlog_debug ("%s: Existing channel oil %s points to %d, modifying to point at %d", + __PRETTY_FUNCTION__, pim_str_sg_dump(sg), c_oil->oil.mfcc_parent, input_vif_index); + c_oil->oil.mfcc_parent = input_vif_index; ++c_oil->oil_ref_count; return c_oil; } -- 2.39.5