From: Donald Sharp Date: Fri, 19 Aug 2016 13:07:19 +0000 (-0400) Subject: pimd: Fix join received when in Prune or Prune Pending X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~278 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=04329d4e498fff314d4b1df571bb509050a23e61;p=mirror%2Ffrr.git pimd: Fix join received when in Prune or Prune Pending When we are a FHR, and the upstream state is in Prune or Prune Pending allow the join because we know we want to forward traffic to the RP. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index b83f0072b4..85bd178d9b 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -169,6 +169,13 @@ void pim_ifchannel_ifjoin_switch(const char *caller, { enum pim_ifjoin_state old_state = ch->ifjoin_state; + if (PIM_DEBUG_PIM_EVENTS) + zlog_debug ("PIM_IFCHANNEL: %s is switching from %s to %s", + pim_str_sg_dump (&ch->sg), + pim_ifchannel_ifjoin_name (ch->ifjoin_state), + pim_ifchannel_ifjoin_name (new_state)); + + if (old_state == new_state) { if (PIM_DEBUG_PIM_EVENTS) { zlog_debug("%s calledby %s: non-transition on state %d (%s)", @@ -178,8 +185,6 @@ void pim_ifchannel_ifjoin_switch(const char *caller, return; } - zassert(old_state != new_state); - ch->ifjoin_state = new_state; /* Transition to/from NOINFO ? */ diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c index 62decfd5f9..4bcb62a90e 100644 --- a/pimd/pim_macro.c +++ b/pimd/pim_macro.c @@ -337,7 +337,7 @@ static int pim_macro_chisin_inherited_olist(const struct pim_ifchannel *ch) */ int pim_macro_chisin_oiflist(const struct pim_ifchannel *ch) { - if (ch->upstream->join_state != PIM_UPSTREAM_JOINED) { + if (ch->upstream->join_state == PIM_UPSTREAM_NOTJOINED) { /* oiflist is NULL */ return 0; /* false */ } diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index abc3f53c56..4563b6ecb4 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1029,7 +1029,6 @@ pim_upstream_inherited_olist (struct pim_upstream *up) int output_intf = 0; pim_ifp = up->rpf.source_nexthop.interface->info; - zlog_debug ("Channel Oil%s: %p", pim_str_sg_dump (&up->sg), up->channel_oil); if (!up->channel_oil) up->channel_oil = pim_channel_oil_add (&up->sg, pim_ifp->mroute_vif_index);