for (ALL_LIST_ELEMENTS_RO(grp->group_source_list, srcnode, src)) {
if (IGMP_SOURCE_TEST_FORWARDING(src->source_flags)) {
- pim_ifchannel_local_membership_add(ifp,
- src->source_addr,
- grp->group_addr);
+ struct prefix sg;
+
+ memset (&sg, 0, sizeof (struct prefix));
+ sg.u.sg.src = src->source_addr;
+ sg.u.sg.grp = grp->group_addr;
+ pim_ifchannel_local_membership_add(ifp, &sg);
}
} /* scan group sources */
}
void pim_ifchannel_local_membership_add(struct interface *ifp,
- struct in_addr source_addr,
- struct in_addr group_addr)
+ struct prefix *sg)
{
struct pim_ifchannel *ch;
struct pim_interface *pim_ifp;
- struct prefix sg;
-
- memset (&sg, 0, sizeof (struct prefix));
- sg.u.sg.src = source_addr;
- sg.u.sg.grp = group_addr;
/* PIM enabled on interface? */
pim_ifp = ifp->info;
if (!PIM_IF_TEST_PIM(pim_ifp->options))
return;
- ch = pim_ifchannel_add(ifp, &sg);
+ ch = pim_ifchannel_add(ifp, sg);
if (!ch) {
return;
}
uint8_t source_flags,
uint16_t holdtime);
void pim_ifchannel_local_membership_add(struct interface *ifp,
- struct in_addr source_addr,
- struct in_addr group_addr);
+ struct prefix *sg);
void pim_ifchannel_local_membership_del(struct interface *ifp,
struct in_addr source_addr,
struct in_addr group_addr);
Feed IGMPv3-gathered local membership information into PIM
per-interface (S,G) state.
*/
- pim_ifchannel_local_membership_add(group->group_igmp_sock->interface,
- source->source_addr, group->group_addr);
+ pim_ifchannel_local_membership_add(group->group_igmp_sock->interface, &sg);
IGMP_SOURCE_DO_FORWARDING(source->source_flags);
}