The pim_upstream_find function should not be finding a *,G
Find what is asked of it.
The switch_to_spt_desired should return true on the RP currently.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
struct pim_upstream *up;
for (ALL_LIST_ELEMENTS_RO(qpim_upstream_list, up_node, up)) {
- if (sg->u.sg.grp.s_addr == up->sg.u.sg.grp.s_addr) {
- if ((up->sg.u.sg.src.s_addr == INADDR_ANY) ||
- (sg->u.sg.src.s_addr == up->sg.u.sg.src.s_addr)) {
- return up;
- }
- }
+ if ((sg->u.sg.grp.s_addr == up->sg.u.sg.grp.s_addr) &&
+ (sg->u.sg.src.s_addr == up->sg.u.sg.src.s_addr))
+ return up;
}
return NULL;
int
pim_upstream_switch_to_spt_desired (struct prefix *sg)
{
+ if (I_am_RP (sg->u.sg.grp))
+ return 1;
+
return 0;
}