if (ch->upstream->channel_oil) {
uint32_t mask = PIM_OIF_FLAG_PROTO_PIM;
if (ch->upstream->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
- mask = PIM_OIF_FLAG_PROTO_IGMP;
+ mask |= PIM_OIF_FLAG_PROTO_IGMP;
/*
* A S,G RPT channel can have an empty oil, we also
* being inherited. So let's figure out what
* needs to be done here
*/
- if (pim_upstream_evaluate_join_desired_interface(
- ch->upstream, ch, ch->parent))
+ if ((ch->sg.src.s_addr != INADDR_ANY) &&
+ pim_upstream_evaluate_join_desired_interface(
+ ch->upstream, ch, ch->parent))
pim_channel_add_oif(ch->upstream->channel_oil,
- ch->interface, mask);
- else
- pim_channel_del_oif(ch->upstream->channel_oil,
- ch->interface, mask);
+ ch->interface,
+ PIM_OIF_FLAG_PROTO_STAR);
+
+ pim_channel_del_oif(ch->upstream->channel_oil,
+ ch->interface, mask);
/*
* Do we have any S,G's that are inheriting?
* Nuke from on high too.
pim_upstream_del(pim_ifp->pim, ch->upstream,
__PRETTY_FUNCTION__);
- else
- zlog_warn("%s: Avoiding deletion of upstream with ref_count %d "
- "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
- ch->upstream->ref_count, ch->interface->name,
- ch->sg_str);
+ else {
+ if (PIM_DEBUG_PIM_TRACE)
+ zlog_debug("%s: Avoiding deletion of upstream with ref_count %d "
+ "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
+ ch->upstream->ref_count, ch->interface->name,
+ ch->sg_str);
+ }
ch->upstream = NULL;
while (!RB_EMPTY(pim_ifchannel_rb, &pim_ifp->ifchannel_rb)) {
ch = RB_ROOT(pim_ifchannel_rb, &pim_ifp->ifchannel_rb);
+ pim_ifchannel_ifjoin_switch(__PRETTY_FUNCTION__,
+ ch, PIM_IFJOIN_NOINFO);
pim_ifchannel_delete(ch);
}
}
ch = THREAD_ARG(t);
+ if (PIM_DEBUG_PIM_TRACE)
+ zlog_debug("%s: ifchannel %s expiry timer", __PRETTY_FUNCTION__,
+ ch->sg_str);
+
ifjoin_to_noinfo(ch, true);
/* ch may have been deleted */
ch = THREAD_ARG(t);
- if (PIM_DEBUG_TRACE)
+ if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: IFCHANNEL%s %s Prune Pending Timer Popped",
__PRETTY_FUNCTION__, pim_str_sg_dump(&ch->sg),
ch = pim_ifchannel_add(ifp, sg, source_flags,
PIM_UPSTREAM_FLAG_MASK_SRC_PIM);
- if (!ch)
- return;
/*
RFC 4601: 4.6.1. (S,G) Assert Message State Machine
ch = pim_ifchannel_find(ifp, sg);
if (!ch && !(source_flags & PIM_ENCODE_RPT_BIT)) {
- if (PIM_DEBUG_TRACE)
+ if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
"%s: Received prune with no relevant ifchannel %s%s state: %d",
__PRETTY_FUNCTION__, ifp->name,
ch = pim_ifchannel_add(ifp, sg, source_flags,
PIM_UPSTREAM_FLAG_MASK_SRC_PIM);
- if (!ch)
- return;
pim_ifp = ifp->info;
}
ch = pim_ifchannel_add(ifp, sg, 0, PIM_UPSTREAM_FLAG_MASK_SRC_IGMP);
- if (!ch) {
- if (PIM_DEBUG_EVENTS)
- zlog_debug("%s:%s Unable to add ifchannel",
- __PRETTY_FUNCTION__,
- pim_str_sg_dump(sg));
- return 0;
- }
ifmembership_set(ch, PIM_IFMEMBERSHIP_INCLUDE);
}
if (new_couldassert) {
- /* CouldAssert(S,G,I) switched from FALSE to TRUE */
+ /* CouldAssert(S,G,I) switched from false to true */
PIM_IF_FLAG_SET_COULD_ASSERT(ch->flags);
} else {
- /* CouldAssert(S,G,I) switched from TRUE to FALSE */
+ /* CouldAssert(S,G,I) switched from true to false */
PIM_IF_FLAG_UNSET_COULD_ASSERT(ch->flags);
if (ch->ifassert_state == PIM_IFASSERT_I_AM_WINNER) {
}
if (new_atd) {
- /* AssertTrackingDesired(S,G,I) switched from FALSE to TRUE */
+ /* AssertTrackingDesired(S,G,I) switched from false to true */
PIM_IF_FLAG_SET_ASSERT_TRACKING_DESIRED(ch->flags);
} else {
- /* AssertTrackingDesired(S,G,I) switched from TRUE to FALSE */
+ /* AssertTrackingDesired(S,G,I) switched from true to false */
PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(ch->flags);
if (ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER) {