diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-14 20:13:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-14 20:13:31 -0400 |
| commit | a5ca0ef54fe627dc5350b6949ec8cd271689523c (patch) | |
| tree | abf885c85d5c73032f6256a98fad46f86cce9a5c /pimd/pim_join.c | |
| parent | 2c6592c1405808e95dc43e298a9ec4446e9cbdd1 (diff) | |
| parent | fa8c500f547ee96475be0fd993d36ab47f59d463 (diff) | |
Merge pull request #5895 from patrasar/2404618
pimd: Clear (s,g,rpt) ifchannel on (*, G) prune received
Diffstat (limited to 'pimd/pim_join.c')
| -rw-r--r-- | pimd/pim_join.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c index 3a88de2070..f54d5bf9bf 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -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); |
