]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: multicast route not removed from kernel when the if goes down
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Tue, 12 Jul 2016 19:25:11 +0000 (15:25 -0400)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Tue, 12 Jul 2016 19:25:11 +0000 (15:25 -0400)
When a multicast route's rpf changes( for whatever reason ) (*,G)
routes were never updating properly.  This is because we were
attempting to fing the path to the *, instead of the RP.
Modify the code to check if we are attempting to find a
* route and use the RP instead.

Ticket: CM-11736
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_zebra.c

index 47515bcbca16b94139b6d0cbcda1fadd7f33f642..efab00e2275c1e8c5c0750a1768844dea1b79654 100644 (file)
@@ -387,18 +387,27 @@ static void scan_upstream_rpf_cache()
 void
 pim_scan_individual_oil (struct channel_oil *c_oil)
 {
+  struct in_addr vif_source;
+  int input_iface_vif_index;
   int old_vif_index;
-  int input_iface_vif_index = fib_lookup_if_vif_index(c_oil->oil.mfcc_origin);
 
+  if (!pim_rp_set_upstream_addr (&vif_source, c_oil->oil.mfcc_origin))
+    return;
+
+  input_iface_vif_index = fib_lookup_if_vif_index (vif_source);
   if (input_iface_vif_index < 1)
     {
-      char source_str[100];
-      char group_str[100];
-      pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, source_str, sizeof(source_str));
-      pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, group_str, sizeof(group_str));
-      zlog_warn("%s %s: could not find input interface for (S,G)=(%s,%s)",
-               __FILE__, __PRETTY_FUNCTION__,
-               source_str, group_str);
+      if (PIM_DEBUG_ZEBRA)
+        {
+          char source_str[100];
+          char group_str[100];
+          pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, source_str, sizeof(source_str));
+          pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, group_str, sizeof(group_str));
+          zlog_debug("%s %s: could not find input interface(%d) for (S,G)=(%s,%s)",
+                    __FILE__, __PRETTY_FUNCTION__, c_oil->oil.mfcc_parent,
+                    source_str, group_str);
+        }
+      pim_mroute_del (c_oil);
       return;
     }