From: Donald Sharp Date: Fri, 19 Aug 2016 19:21:45 +0000 (-0400) Subject: pimd: Fix RP upstream Prune -> join state X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~275 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7747bad6ac449903b4ff95bb495c08010084f862;p=mirror%2Ffrr.git pimd: Fix RP upstream Prune -> join state This fix allows the RP to transition from a Prune'd to Join state on reception of proper control messages. Additionally it was noticed on if down -> if up transitions the prune then join message was going out the wrong interface. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 37b900688e..68c773d0c8 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -393,6 +393,12 @@ pim_upstream_switch(struct pim_upstream *up, switch (up->join_state) { case PIM_UPSTREAM_PRUNE: + if (!up->fhr) + { + up->join_state = new_state; + up->state_transition = pim_time_monotonic_sec (); + } + break; case PIM_UPSTREAM_JOIN_PENDING: break; case PIM_UPSTREAM_NOTJOINED: diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 94cd658932..b171fbb702 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -331,8 +331,10 @@ static void scan_upstream_rpf_cache() for (ALL_LIST_ELEMENTS(qpim_upstream_list, up_node, up_nextnode, up)) { struct in_addr old_rpf_addr; + struct interface *old_interface; enum pim_rpf_result rpf_result; + old_interface = up->rpf.source_nexthop.interface; rpf_result = pim_rpf_update(up, &old_rpf_addr); if (rpf_result == PIM_RPF_FAILURE) continue; @@ -364,10 +366,8 @@ static void scan_upstream_rpf_cache() /* send Prune(S,G) to the old upstream neighbor */ - pim_joinprune_send(up->rpf.source_nexthop.interface, - old_rpf_addr, - &up->sg, - 0 /* prune */); + pim_joinprune_send(old_interface, old_rpf_addr, + &up->sg, 0 /* prune */); /* send Join(S,G) to the current upstream neighbor */ pim_joinprune_send(up->rpf.source_nexthop.interface,