pimd: Convert pim_ifchannel_local_membership_del to struct prefix *sg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-07-22 23:50:29 -04:00 committed by Donald Sharp
parent 6928363995
commit 1103466bb3
3 changed files with 12 additions and 17 deletions

View File

@ -698,16 +698,10 @@ void pim_ifchannel_local_membership_add(struct interface *ifp,
}
void pim_ifchannel_local_membership_del(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;
@ -716,7 +710,7 @@ void pim_ifchannel_local_membership_del(struct interface *ifp,
if (!PIM_IF_TEST_PIM(pim_ifp->options))
return;
ch = pim_ifchannel_find(ifp, &sg);
ch = pim_ifchannel_find(ifp, sg);
if (!ch)
return;

View File

@ -121,8 +121,7 @@ void pim_ifchannel_prune(struct interface *ifp,
void pim_ifchannel_local_membership_add(struct interface *ifp,
struct prefix *sg);
void pim_ifchannel_local_membership_del(struct interface *ifp,
struct in_addr source_addr,
struct in_addr group_addr);
struct prefix *sg);
void pim_ifchannel_ifjoin_switch(const char *caller,
struct pim_ifchannel *ch,

View File

@ -952,6 +952,7 @@ void igmp_source_forward_start(struct igmp_source *source)
struct prefix sg;
int result;
memset (&sg, 0, sizeof (struct prefix));
sg.u.sg.src = source->source_addr;
sg.u.sg.grp = source->source_group->group_addr;
@ -1056,16 +1057,17 @@ void igmp_source_forward_start(struct igmp_source *source)
void igmp_source_forward_stop(struct igmp_source *source)
{
struct igmp_group *group;
struct prefix sg;
int result;
memset (&sg, 0, sizeof (struct prefix));
sg.u.sg.src = source->source_addr;
sg.u.sg.grp = source->source_group->group_addr;
if (PIM_DEBUG_IGMP_TRACE) {
char source_str[100];
char group_str[100];
pim_inet4_dump("<source?>", source->source_addr, source_str, sizeof(source_str));
pim_inet4_dump("<group?>", source->source_group->group_addr, group_str, sizeof(group_str));
zlog_debug("%s: (S,G)=(%s,%s) igmp_sock=%d oif=%s fwd=%d",
zlog_debug("%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d",
__PRETTY_FUNCTION__,
source_str, group_str,
pim_str_sg_dump (&sg),
source->source_group->group_igmp_sock->fd,
source->source_group->group_igmp_sock->interface->name,
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
@ -1104,7 +1106,7 @@ void igmp_source_forward_stop(struct igmp_source *source)
per-interface (S,G) state.
*/
pim_ifchannel_local_membership_del(group->group_igmp_sock->interface,
source->source_addr, group->group_addr);
&sg);
IGMP_SOURCE_DONT_FORWARDING(source->source_flags);
}