]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Correctly associate channel oil with correct IIF
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 6 Dec 2016 18:52:14 +0000 (13:52 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:18 +0000 (20:26 -0500)
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>
pimd/pim_oil.c

index e002de03003e7374d156c198c160c16e4546c75a..88ace45ed9e5b2d70037e03a0222caa7c8dcbe3a 100644 (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;
   }