diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2017-05-29 12:37:26 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-29 12:37:26 -0600 |
| commit | f3d2ef782d0733cacb40cbd3c99b589f2c9eb8f4 (patch) | |
| tree | 7c37af6a0f03d28a77610ad06366a6c792125fe2 /pimd/pim_ifchannel.c | |
| parent | 1bab0e1056a4e28d4a000900f4ac8a18d1057bad (diff) | |
| parent | ee22bbae78d0a17c0f34da106f77ba2fd80e6b0d (diff) | |
Merge pull request #583 from chiragshah6/pim_dev_3_0
pimd: Fix to Transmit S,G Join when transitioning from SGRpt to Join state
Diffstat (limited to 'pimd/pim_ifchannel.c')
| -rw-r--r-- | pimd/pim_ifchannel.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index d46cc70b06..6f5e8f1493 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -1287,7 +1287,7 @@ pim_ifchannel_scan_forward_start (struct interface *new_ifp) * we get End of Message */ void -pim_ifchannel_set_star_g_join_state (struct pim_ifchannel *ch, int eom, uint8_t source_flags, uint8_t join) +pim_ifchannel_set_star_g_join_state (struct pim_ifchannel *ch, int eom, uint8_t source_flags, uint8_t join, uint8_t starg_alone) { struct pim_ifchannel *child; struct listnode *ch_node; @@ -1302,10 +1302,11 @@ pim_ifchannel_set_star_g_join_state (struct pim_ifchannel *ch, int eom, uint8_t for (ALL_LIST_ELEMENTS_RO (ch->sources, ch_node, child)) { /* Only *,G Join received and no (SG-RPT) prune. + eom = 1, only (W,G) join_alone is true, WC and RPT are set. Scan all S,G associated to G and if any SG-RPT remove the SG-RPT flag. */ - if (join && (source_flags & PIM_RPT_BIT_MASK) && + if (eom && starg_alone && (source_flags & PIM_RPT_BIT_MASK) && (source_flags & PIM_WILDCARD_BIT_MASK)) { if (PIM_IF_FLAG_TEST_S_G_RPT(child->flags)) @@ -1316,25 +1317,13 @@ pim_ifchannel_set_star_g_join_state (struct pim_ifchannel *ch, int eom, uint8_t if (up) { if (PIM_DEBUG_TRACE) - zlog_debug ("%s: clearing SGRpt flag, add inherit oif to up %s ", __PRETTY_FUNCTION__, up->sg_str); + zlog_debug ("%s: SGRpt flag is cleared, add inherit oif to up %s", + __PRETTY_FUNCTION__, up->sg_str); pim_channel_add_oif (up->channel_oil, ch->interface, PIM_OIF_FLAG_PROTO_STAR); + pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__, child, PIM_IFJOIN_JOIN); } } } - /* Received SG-RPT Prune delete oif from S,G */ - else if (join == 0 && (source_flags & PIM_RPT_BIT_MASK) && - !(source_flags & PIM_WILDCARD_BIT_MASK)) - { - struct pim_upstream *up = child->upstream; - - PIM_IF_FLAG_SET_S_G_RPT(child->flags); - if (up) - { - if (PIM_DEBUG_TRACE) - zlog_debug ("%s: SGRpt Set, del inherit oif from up %s", __PRETTY_FUNCTION__, up->sg_str); - pim_channel_del_oif (up->channel_oil, ch->interface, PIM_OIF_FLAG_PROTO_STAR); - } - } if (!PIM_IF_FLAG_TEST_S_G_RPT(child->flags)) continue; |
