static int pim_upstream_keep_alive_timer(struct thread *t)
{
struct pim_upstream *up;
+ struct pim_instance *pim;
up = THREAD_ARG(t);
+ pim = up->channel_oil->pim;
- if (I_am_RP(pimg, up->sg.grp)) {
+ if (I_am_RP(pim, up->sg.grp)) {
pim_br_clear_pmbr(&up->sg);
/*
* We need to do more here :)
/* if entry was created because of activity we need to deref it */
if (PIM_UPSTREAM_FLAG_TEST_SRC_STREAM(up->flags)) {
- pim_upstream_fhr_kat_expiry(pimg, up);
+ pim_upstream_fhr_kat_expiry(pim, up);
if (PIM_DEBUG_TRACE)
zlog_debug("kat expired on %s; remove stream reference",
up->sg_str);
PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM(up->flags);
- pim_upstream_del(pimg, up, __PRETTY_FUNCTION__);
+ pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
} else if (PIM_UPSTREAM_FLAG_TEST_SRC_LHR(up->flags)) {
PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(up->flags);
- pim_upstream_del(pimg, up, __PRETTY_FUNCTION__);
+ pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
}
return 0;
* SwitchToSptDesired(S,G) return true once a single packet has been
* received for the source and group.
*/
-int pim_upstream_switch_to_spt_desired(struct prefix_sg *sg)
+int pim_upstream_switch_to_spt_desired(struct pim_instance *pim,
+ struct prefix_sg *sg)
{
- if (I_am_RP(pimg, sg->grp))
+ if (I_am_RP(pim, sg->grp))
return 1;
return 0;
static int pim_upstream_register_stop_timer(struct thread *t)
{
struct pim_interface *pim_ifp;
+ struct pim_instance *pim;
struct pim_upstream *up;
struct pim_rpf *rpg;
struct ip ip_hdr;
up = THREAD_ARG(t);
+ pim = up->channel_oil->pim;
if (PIM_DEBUG_TRACE) {
char state_str[PIM_REG_STATE_STR_LEN];
switch (up->reg_state) {
case PIM_REG_JOIN_PENDING:
up->reg_state = PIM_REG_JOIN;
- pim_channel_add_oif(up->channel_oil, pimg->regiface,
+ pim_channel_add_oif(up->channel_oil, pim->regiface,
PIM_OIF_FLAG_PROTO_PIM);
break;
case PIM_REG_JOIN:
*/
static bool pim_upstream_kat_start_ok(struct pim_upstream *up)
{
+ struct pim_instance *pim = up->channel_oil->pim;
+
/* "iif == RPF_interface(S)" check has to be done by the kernel or hw
* so we will skip that here */
if (pim_if_connected_to_source(up->rpf.source_nexthop.interface,
* MUST be
* removed to handle spt turn-arounds correctly in a 3-tier clos
*/
- if (I_am_RP(pimg, up->sg.grp))
+ if (I_am_RP(pim, up->sg.grp))
return true;
}
static void pim_upstream_sg_running(void *arg)
{
struct pim_upstream *up = (struct pim_upstream *)arg;
+ struct pim_instance *pim = up->channel_oil->pim;
// No packet can have arrived here if this is the case
- if (!up->channel_oil || !up->channel_oil->installed) {
+ if (!up->channel_oil->installed) {
if (PIM_DEBUG_TRACE)
zlog_debug("%s: %s is not installed in mroute",
__PRETTY_FUNCTION__, up->sg_str);
zlog_debug(
"%s: Handling unscanned inherited_olist for %s",
__PRETTY_FUNCTION__, up->sg_str);
- pim_upstream_inherited_olist_decide(pimg, up);
+ pim_upstream_inherited_olist_decide(pim, up);
up->channel_oil->oil_inherited_rescan = 0;
}
pim_mroute_update_counters(up->channel_oil);