]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: When deleting upstream double ensure route is removed
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 19 Aug 2016 14:05:01 +0000 (10:05 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
Ensure that when an upstream is removed that we actually
remove the route

Also when we get a callback for whole packet before
we send a register stop make sure we are actually on the
RP.

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

index 02d6e8a0996430b579efd800a20805e49b9ecdef..e678b87cc7e2c15b7b5b38a48aa14a767b2389eb 100644 (file)
@@ -350,13 +350,20 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf)
   up = pim_upstream_find (&sg);
   if (up)
     {
-      struct pim_nexthop source;
-      //No if channel, but upstream we are at the RP.
-      pim_nexthop_lookup (&source, up->upstream_register, NULL);
-      pim_register_stop_send(source.interface, &sg, up->upstream_register);
-      //Send S bit down the join.
-      up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
-      return 0;
+      /*
+       * If we are the fhr that means we are getting a callback during
+       * the pimreg period, so I believe we can ignore this packet
+       */
+      if (!up->fhr)
+       {
+         struct pim_nexthop source;
+         //No if channel, but upstream we are at the RP.
+         pim_nexthop_lookup (&source, up->upstream_register, NULL);
+         pim_register_stop_send(source.interface, &sg, up->upstream_register);
+         //Send S bit down the join.
+         up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
+       }
+         return 0;
     }
 
   up = pim_upstream_add (&sg, ifp);
index 4563b6ecb4cc7b1150ab3718d5ef41f33cb46798..bd6677d47d856e8b60e13b4e6ff5a6cf1994b8e4 100644 (file)
@@ -156,6 +156,7 @@ void pim_upstream_delete(struct pim_upstream *up)
   THREAD_OFF(up->t_rs_timer);
 
   pim_upstream_remove_children (up);
+  pim_mroute_del (up->channel_oil);
   upstream_channel_oil_detach(up);
 
   /*