if (ch->upstream->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
mask = PIM_OIF_FLAG_PROTO_IGMP;
+ /* SGRpt entry could have empty oil */
+ if (ch->upstream->channel_oil)
+ pim_channel_del_oif (ch->upstream->channel_oil, ch->interface, mask);
pim_channel_del_oif (ch->upstream->channel_oil, ch->interface, mask);
/*
* Do we have any S,G's that are inheriting?
pim_ifp = ifp->info;
send_prune_echo = (listcount(pim_ifp->pim_neighbor_list) > 1);
+ //ch->ifjoin_state transition to NOINFO
ifjoin_to_noinfo(ch);
/* from here ch may have been deleted */
if (!chchannel && c_oil && c_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index])
pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_STAR);
- if (c_oil->oil_size == 0)
- pim_upstream_del (child, __PRETTY_FUNCTION__);
+ /* Child node removal/ref count-- will happen as part of parent' delete_no_info */
}
}
delete_on_noinfo(orig);
if (up)
{
if (PIM_DEBUG_TRACE)
- zlog_debug ("%s: add inherit oif to up %s ", __PRETTY_FUNCTION__, up->sg_str);
+ zlog_debug ("%s: clearing SGRpt flag, 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);
}
}
struct list *groups)
{
struct pim_jp_agg_group *group;
- struct pim_interface *pim_ifp;
+ struct pim_interface *pim_ifp = NULL;
struct pim_jp_groups *grp = NULL;
struct pim_jp *msg;
struct listnode *node, *nnode;
return -1;
}
- if (!pim_ifp) {
- zlog_warn("%s: multicast not enabled on interface %s",
+ if (!pim_ifp)
+ {
+ zlog_warn ("%s: multicast not enabled on interface %s",
__PRETTY_FUNCTION__,
rpf->source_nexthop.interface->name);
- return -1;
- }
+ return -1;
+ }
if (PIM_INADDR_IS_ANY(rpf->rpf_addr.u.prefix4))
{
static bool first = true;
/* skip JP upstream messages if source is directly connected */
- if (!rpf->source_nexthop.interface ||
+ if (!up || !rpf->source_nexthop.interface ||
pim_if_connected_to_source (rpf->source_nexthop.interface, up->sg.src))
return;
struct pim_rpf *rpf = pim_rp_g (source->up->sg.grp);
bits = PIM_ENCODE_SPARSE_BIT | PIM_ENCODE_WC_BIT | PIM_ENCODE_RPT_BIT;
stosend = rpf->rpf_addr.u.prefix4;
- up = source->up;
+ /* Only Send SGRpt in case of *,G Join */
+ if (source->is_join)
+ up = source->up;
}
else
{
char buf1[PREFIX2STR_BUFFER];
prefix2str (&nht_p, buf, sizeof (buf));
prefix2str (&rp_info->group, buf1, sizeof (buf1));
- zlog_debug ("%s: NHT Register RP addr %s grp %s with Zebra ",
+ zlog_debug ("%s: NHT Register RP addr %s grp %s with Zebra",
__PRETTY_FUNCTION__, buf, buf1);
}
memset (&pnc, 0, sizeof (struct pim_nexthop_cache));
char buf1[PREFIX2STR_BUFFER];
prefix2str (&nht_p, buf, sizeof (buf));
prefix2str (&g, buf1, sizeof (buf1));
- zlog_debug ("%s: Nexthop cache not found for RP %s grp %s register with Zebra NHT",
+ zlog_debug ("%s: Nexthop cache not found for RP %s grp %s register with Zebra",
__PRETTY_FUNCTION__, buf, buf1);
}
pim_rpf_set_refresh_time ();
if (pim_ecmp_nexthop_lookup (&rpf->source_nexthop,
up->upstream_addr, &src, &grp,
!PIM_UPSTREAM_FLAG_TEST_FHR (up->flags) &&
- !PIM_UPSTREAM_FLAG_TEST_SRC_IGMP (up->
- flags)))
+ !PIM_UPSTREAM_FLAG_TEST_SRC_IGMP (up->flags)))
{
return PIM_RPF_FAILURE;
}
up->sources = NULL;
list_delete (up->ifchannels);
+ up->ifchannels = NULL;
/*
notice that listnode_delete() can't be moved
{
char buf[PREFIX2STR_BUFFER];
prefix2str (&nht_p, buf, sizeof (buf));
- zlog_debug ("%s: Deregister upstream %s addr %s with Zebra",
+ zlog_debug ("%s: Deregister upstream %s addr %s with Zebra NHT",
__PRETTY_FUNCTION__, up->sg_str, buf);
}
pim_delete_tracked_nexthop (&nht_p, up, NULL);
struct pim_ifchannel *ch;
/* scan per-interface (S,G) state */
- for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch))
+ {
+ if (!ch->interface)
+ continue;
+ pim_ifp = ch->interface->info;
+ if (!pim_ifp)
+ continue;
- pim_ifchannel_update_assert_tracking_desired(ch);
+ pim_ifchannel_update_assert_tracking_desired(ch);
- } /* scan iface channel list */
+ } /* scan iface channel list */
}
/* When kat is stopped CouldRegister goes to false so we need to