summaryrefslogtreecommitdiff
path: root/pimd/pim_ifchannel.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-06-13 09:18:14 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-06-13 09:18:14 +0200
commit97bd5c48de49f1a25c6fb979f0ca151412fbd61b (patch)
tree924b30812e7ae8d9d2f7c897b4ebbbf19802eff8 /pimd/pim_ifchannel.c
parentcea34723daeb767a5b92fa5800ebed81e3f690b6 (diff)
parentad2e2470f63e3fac228b6cc532dfe36a0794a846 (diff)
Merge remote-tracking branch 'frr/master' into pull-624
Diffstat (limited to 'pimd/pim_ifchannel.c')
-rw-r--r--pimd/pim_ifchannel.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 9b79c032c8..021722dfc2 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -387,12 +387,14 @@ const char *pim_ifchannel_ifassert_name(enum pim_ifassert_state ifassert_state)
*/
void reset_ifassert_state(struct pim_ifchannel *ch)
{
+ struct in_addr any = { .s_addr = INADDR_ANY };
+
THREAD_OFF(ch->t_ifassert_timer);
pim_ifassert_winner_set(ch,
- PIM_IFASSERT_NOINFO,
- qpim_inaddr_any,
- qpim_infinite_assert_metric);
+ PIM_IFASSERT_NOINFO,
+ any,
+ qpim_infinite_assert_metric);
}
struct pim_ifchannel *pim_ifchannel_find(struct interface *ifp,
@@ -1277,7 +1279,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;
@@ -1292,10 +1294,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))
@@ -1306,25 +1309,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;