]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: When the RPF is changed remove the group
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Mar 2017 12:38:03 +0000 (08:38 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Mar 2017 22:59:28 +0000 (18:59 -0400)
When changing the RPF cleanup the old entry
in the J/P Agg neighbor list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_nht.c
pimd/pim_upstream.c
pimd/pim_zebra.c

index c8cc187305df28332dbe919a79d2c6c862135854..5fc5d08d1662bd6bcd67b8fcc96152381f512787 100644 (file)
@@ -370,6 +370,12 @@ pim_update_upstream_nh (struct pim_nexthop_cache *pnc)
 
       if (rpf_result == PIM_RPF_CHANGED)
         {
+          struct pim_neighbor *nbr;
+
+          nbr = pim_neighbor_find (old.source_nexthop.interface,
+                                   old.rpf_addr.u.prefix4);
+          if (nbr)
+            pim_jp_agg_remove_group (nbr->upstream_jp_agg, up);
 
           /*
            * We have detected a case where we might need to rescan
index 8ea9e3d688d08ed8913650586e4f798b5b7c1ac9..0f16bc0f86e814b5e191169de628db7ac6c6585b 100644 (file)
@@ -337,13 +337,6 @@ join_timer_start(struct pim_upstream *up)
  */
 void pim_upstream_join_timer_restart(struct pim_upstream *up, struct pim_rpf *old)
 {
-  struct pim_neighbor *nbr;
-
-  nbr = pim_neighbor_find (old->source_nexthop.interface,
-                           old->rpf_addr.u.prefix4);
-  if (nbr)
-    pim_jp_agg_remove_group (nbr->upstream_jp_agg, up);
-
   //THREAD_OFF(up->t_join_timer);
   join_timer_start(up);
 }
index ad4ef64edab525aeb11863d56b15134e338b1538..3ff0d3818538948d607c636e8d0dd49ffee5c428 100644 (file)
@@ -382,6 +382,13 @@ static void scan_upstream_rpf_cache()
       continue;
 
     if (rpf_result == PIM_RPF_CHANGED) {
+      struct pim_neighbor *nbr;
+
+      nbr = pim_neighbor_find (old.source_nexthop.interface,
+                               old.rpf_addr.u.prefix4);
+      if (nbr)
+        pim_jp_agg_remove_group (nbr->upstream_jp_agg, up);
+
       /*
        * We have detected a case where we might need to rescan
        * the inherited o_list so do it.