if (!upstream)
{
upstream = pim_upstream_add (&sg, ifp);
+
+ pim_rp_set_upstream_addr (&upstream->upstream_addr, sg.u.sg.src);
+ pim_nexthop_lookup (&upstream->rpf.source_nexthop,
+ upstream->upstream_addr, NULL);
+ upstream->rpf.source_nexthop.interface = ifp;
+ upstream->sg.u.sg.src = sg.u.sg.src;
+ upstream->rpf.rpf_addr = upstream->rpf.source_nexthop.mrib_nexthop_addr;
+
pim_upstream_switch (upstream, PIM_UPSTREAM_PRUNE);
}
if ((upstream->sptbit == PIM_UPSTREAM_SPTBIT_TRUE) ||
((SwitchToSptDesired(&sg)) &&
pim_upstream_inherited_olist (upstream) == 0)) {
- pim_rp_set_upstream_addr (&upstream->upstream_addr, sg.u.sg.src);
- pim_nexthop_lookup (&upstream->rpf.source_nexthop,
- upstream->upstream_addr, NULL);
- upstream->rpf.source_nexthop.interface = ifp;
- upstream->sg.u.sg.src = sg.u.sg.src;
- upstream->rpf.rpf_addr = upstream->rpf.source_nexthop.mrib_nexthop_addr;
- upstream->channel_oil->oil.mfcc_origin = sg.u.sg.src;
- pim_scan_individual_oil (upstream->channel_oil);
+ //pim_scan_individual_oil (upstream->channel_oil);
pim_register_stop_send (ifp, &sg, src_addr);
sentRegisterStop = 1;
}
/* switched from false to true */
if (is_join_desired && !was_join_desired) {
- zassert(up->join_state == PIM_UPSTREAM_NOTJOINED);
+ zassert(up->join_state == PIM_UPSTREAM_NOTJOINED ||
+ up->join_state == PIM_UPSTREAM_PRUNE);
pim_upstream_switch(up, PIM_UPSTREAM_JOINED);
return;
}
for (ALL_LIST_ELEMENTS (pim_ifp->pim_ifchannel_list, chnode, chnextnode, ch))
{
+ struct pim_ifchannel *nch;
+
if (ch->upstream != anysrc_up)
continue;
if (ch->ifjoin_state == PIM_IFJOIN_JOIN)
{
- pim_ifchannel_add (ifp, &up->sg);
+ nch = pim_ifchannel_add (ifp, &up->sg);
+ pim_ifchannel_ifjoin_switch (__PRETTY_FUNCTION__, nch, PIM_IFJOIN_JOIN);
+ pim_forward_start (ch);
output_intf++;
}
}
}
if (output_intf)
- pim_upstream_send_join (up);
+ if (up->join_state != PIM_UPSTREAM_JOINED)
+ pim_upstream_switch (up, PIM_UPSTREAM_JOINED);
return output_intf;
}