/*
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true) set
SPTbit(S,G) to TRUE.
-
- Notice: For PIM SSM, SPTbit(S,G) is already always true.
*/
+ if (ch->upstream->rpf.source_nexthop.interface == ch->interface)
+ if (ch->upstream->join_state == PIM_UPSTREAM_JOINED)
+ ch->upstream->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
zassert(ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER);
}
{
struct interface *ifp;
- /* SPTbit(S,G) is always true for PIM-SSM-Only Routers */
-
ifp = ch->interface;
if (!ifp) {
char src_str[100];
return 0; /* false */
}
+ /* SPTbit(S,G) == TRUE */
+ if (ch->upstream->sptbit == PIM_UPSTREAM_SPTBIT_FALSE)
+ return 0; /* false */
+
/* RPF_interface(S) != I ? */
if (ch->upstream->rpf.source_nexthop.interface == ifp)
return 0; /* false */
up->join_state = 0;
up->state_transition = pim_time_monotonic_sec();
up->channel_oil = 0;
+ up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
up->rpf.source_nexthop.interface = 0;
up->rpf.source_nexthop.mrib_nexthop_addr.s_addr = PIM_NET_INADDR_ANY;
PIM_UPSTREAM_JOINED
};
+enum pim_upstream_sptbit {
+ PIM_UPSTREAM_SPTBIT_FALSE,
+ PIM_UPSTREAM_SPTBIT_TRUE
+};
+
/*
Upstream (S,G) channel in Joined state
struct channel_oil *channel_oil;
enum pim_upstream_state join_state;
+ enum pim_upstream_sptbit sptbit;
+
int ref_count;
struct pim_rpf rpf;