mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 18:59:22 +00:00
pimd: Convert pim_ifchannel_local_membership_del to struct prefix *sg
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
6928363995
commit
1103466bb3
@ -698,16 +698,10 @@ void pim_ifchannel_local_membership_add(struct interface *ifp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void pim_ifchannel_local_membership_del(struct interface *ifp,
|
void pim_ifchannel_local_membership_del(struct interface *ifp,
|
||||||
struct in_addr source_addr,
|
struct prefix *sg)
|
||||||
struct in_addr group_addr)
|
|
||||||
{
|
{
|
||||||
struct pim_ifchannel *ch;
|
struct pim_ifchannel *ch;
|
||||||
struct pim_interface *pim_ifp;
|
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 enabled on interface? */
|
||||||
pim_ifp = ifp->info;
|
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))
|
if (!PIM_IF_TEST_PIM(pim_ifp->options))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ch = pim_ifchannel_find(ifp, &sg);
|
ch = pim_ifchannel_find(ifp, sg);
|
||||||
if (!ch)
|
if (!ch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -121,8 +121,7 @@ void pim_ifchannel_prune(struct interface *ifp,
|
|||||||
void pim_ifchannel_local_membership_add(struct interface *ifp,
|
void pim_ifchannel_local_membership_add(struct interface *ifp,
|
||||||
struct prefix *sg);
|
struct prefix *sg);
|
||||||
void pim_ifchannel_local_membership_del(struct interface *ifp,
|
void pim_ifchannel_local_membership_del(struct interface *ifp,
|
||||||
struct in_addr source_addr,
|
struct prefix *sg);
|
||||||
struct in_addr group_addr);
|
|
||||||
|
|
||||||
void pim_ifchannel_ifjoin_switch(const char *caller,
|
void pim_ifchannel_ifjoin_switch(const char *caller,
|
||||||
struct pim_ifchannel *ch,
|
struct pim_ifchannel *ch,
|
||||||
|
@ -952,6 +952,7 @@ void igmp_source_forward_start(struct igmp_source *source)
|
|||||||
struct prefix sg;
|
struct prefix sg;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
memset (&sg, 0, sizeof (struct prefix));
|
||||||
sg.u.sg.src = source->source_addr;
|
sg.u.sg.src = source->source_addr;
|
||||||
sg.u.sg.grp = source->source_group->group_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)
|
void igmp_source_forward_stop(struct igmp_source *source)
|
||||||
{
|
{
|
||||||
struct igmp_group *group;
|
struct igmp_group *group;
|
||||||
|
struct prefix sg;
|
||||||
int result;
|
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) {
|
if (PIM_DEBUG_IGMP_TRACE) {
|
||||||
char source_str[100];
|
zlog_debug("%s: (S,G)=%s igmp_sock=%d oif=%s fwd=%d",
|
||||||
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",
|
|
||||||
__PRETTY_FUNCTION__,
|
__PRETTY_FUNCTION__,
|
||||||
source_str, group_str,
|
pim_str_sg_dump (&sg),
|
||||||
source->source_group->group_igmp_sock->fd,
|
source->source_group->group_igmp_sock->fd,
|
||||||
source->source_group->group_igmp_sock->interface->name,
|
source->source_group->group_igmp_sock->interface->name,
|
||||||
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
|
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.
|
per-interface (S,G) state.
|
||||||
*/
|
*/
|
||||||
pim_ifchannel_local_membership_del(group->group_igmp_sock->interface,
|
pim_ifchannel_local_membership_del(group->group_igmp_sock->interface,
|
||||||
source->source_addr, group->group_addr);
|
&sg);
|
||||||
|
|
||||||
IGMP_SOURCE_DONT_FORWARDING(source->source_flags);
|
IGMP_SOURCE_DONT_FORWARDING(source->source_flags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user