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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-12-06 13:52:14 -05:00
parent 6a78764e46
commit 8d90ffd05d

View File

@ -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;
}