We need the ability to know where upstream state
comes from and to do the right thing from there.
ticket: CM-12771
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
}
return 0;
}
+ PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
pim_upstream_keep_alive_timer_start (up, qpim_keep_alive_time);
if (pim_if_connected_to_source (ifp, sg.src))
{
up = pim_upstream_add (&sg, ifp);
-
if (!up)
{
if (PIM_DEBUG_MROUTE)
pim_str_sg_dump (&sg), ifp->name);
return -2;
}
+ PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
PIM_UPSTREAM_FLAG_SET_FHR(up->flags);
pim_upstream_keep_alive_timer_start (up, qpim_keep_alive_time);
if (pim_upstream_could_register (up))
{
PIM_UPSTREAM_FLAG_SET_FHR(up->flags);
- if (!old_fhr)
+ if (!old_fhr && PIM_UPSTREAM_FLAG_TEST_SRC_STREAM(up->flags))
{
pim_upstream_keep_alive_timer_start (up, qpim_keep_alive_time);
pim_channel_add_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_PIM);
THREAD_OFF (up->t_join_timer);
pim_joinprune_send (up->rpf.source_nexthop.interface, up->rpf.rpf_addr.u.prefix4,
&up->sg, 0);
+ PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM (up->flags);
pim_upstream_del (up);
}
else