From: Donald Sharp Date: Fri, 19 Aug 2016 14:05:01 +0000 (-0400) Subject: pimd: When deleting upstream double ensure route is removed X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~277 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7fe1f66279eca025c39e401d1c9e8549c49fa284;p=mirror%2Ffrr.git pimd: When deleting upstream double ensure route is removed 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 --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 02d6e8a099..e678b87cc7 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -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); diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 4563b6ecb4..bd6677d47d 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -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); /*