Merge pull request #5895 from patrasar/2404618

pimd: Clear (s,g,rpt) ifchannel on (*, G) prune received
This commit is contained in:
Donald Sharp 2020-10-14 20:13:31 -04:00 committed by GitHub
commit a5ca0ef54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,8 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
uint8_t *pastend;
int remain;
int group;
struct pim_ifchannel *child = NULL;
struct listnode *ch_node, *nch_node;
buf = tlv_buf;
pastend = tlv_buf + tlv_buf_size;
@ -337,9 +339,24 @@ int pim_joinprune_recv(struct interface *ifp, struct pim_neighbor *neigh,
*/
sg_ch = pim_ifchannel_find(ifp, &sg);
if (!sg_ch)
continue;
/* (*,G) prune received */
for (ALL_LIST_ELEMENTS(sg_ch->sources, ch_node,
nch_node, child)) {
if (PIM_IF_FLAG_TEST_S_G_RPT(child->flags)) {
if (child->ifjoin_state
== PIM_IFJOIN_PRUNE_PENDING_TMP)
THREAD_OFF(
child->t_ifjoin_prune_pending_timer);
PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
child->ifjoin_state = PIM_IFJOIN_NOINFO;
}
}
/* Received SG-RPT Prune delete oif from specific S,G */
if (starg_ch && sg_ch
&& (msg_source_flags & PIM_RPT_BIT_MASK)
if (starg_ch && (msg_source_flags & PIM_RPT_BIT_MASK)
&& !(msg_source_flags & PIM_WILDCARD_BIT_MASK)) {
struct pim_upstream *up = sg_ch->upstream;
PIM_IF_FLAG_SET_S_G_RPT(sg_ch->flags);