summaryrefslogtreecommitdiff
path: root/pimd/pim_ifchannel.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2017-05-12 12:05:46 -0700
committerChirag Shah <chirag@cumulusnetworks.com>2017-05-18 14:36:25 -0700
commitee22bbae78d0a17c0f34da106f77ba2fd80e6b0d (patch)
treece348e7fe2c83258799ae8eb89f93bf9cda3e1c0 /pimd/pim_ifchannel.c
parentf1deac618b5ff78657d04f443a74799881b76e21 (diff)
pimd: Fix to Tx S,G Join when SGRpt->Join state
-Upon Rx (*,G) Join w/o SGRpt at RP, trigger (S,G) Join towards FHR, unset SGRpt flag from channel, add (*,G) oif to (S,G) entry. -Add I am not RP check to triger SGRpt on *,G path otherwise, send S,G Prune on SPT path from RP to FHR upon receving *,G Prune. -Upon Rx SGRpt receive, remove OIF(downstream where Prune received) from specific S,G. Testing Done: pim-smoke Ran 95 tests in 11790.552s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_ifchannel.c')
-rw-r--r--pimd/pim_ifchannel.c23
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;