pimd: Remove igmp_add_group_by_addr unneeded parameter
The interface name is already passed in as
part of the 'struct igrmp *group' pointer.
No need to do it twice.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 0d6f07a..ad3c7b5 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -624,7 +624,7 @@
memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return -1;
}
@@ -681,7 +681,7 @@
memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return -1;
}
@@ -1359,8 +1359,7 @@
}
struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
- struct in_addr group_addr,
- const char *ifname)
+ struct in_addr group_addr)
{
struct igmp_group *group;
@@ -1398,8 +1397,8 @@
}
group->group_source_list->del = (void (*)(void *)) igmp_source_free;
- group->t_group_timer = 0;
- group->t_group_query_retransmit_timer = 0;
+ group->t_group_timer = NULL;
+ group->t_group_query_retransmit_timer = NULL;
group->group_specific_query_retransmit_count = 0;
group->group_addr = group_addr;
group->group_igmp_sock = igmp;
@@ -1416,7 +1415,7 @@
char group_str[100];
pim_inet4_dump("<group?>", group->group_addr, group_str, sizeof(group_str));
zlog_debug("Creating new IGMP group %s on socket %d interface %s",
- group_str, group->group_igmp_sock->fd, ifname);
+ group_str, igmp->fd, igmp->interface->name);
}
/*
diff --git a/pimd/pim_igmp.h b/pimd/pim_igmp.h
index f8a31cd..ab39615 100644
--- a/pimd/pim_igmp.h
+++ b/pimd/pim_igmp.h
@@ -163,8 +163,7 @@
};
struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
- struct in_addr group_addr,
- const char *ifname);
+ struct in_addr group_addr);
void igmp_group_delete_empty_include(struct igmp_group *group);
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index 1a2e936..8a32a32 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -542,12 +542,11 @@
struct in_addr group_addr,
int num_sources, struct in_addr *sources)
{
- struct interface *ifp = igmp->interface;
struct igmp_group *group;
int i;
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return;
}
@@ -688,7 +687,7 @@
ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return;
}
@@ -810,7 +809,7 @@
ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return;
}
@@ -960,7 +959,7 @@
ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return;
}
@@ -1481,7 +1480,7 @@
ifp, from, group_addr, num_sources, sources);
/* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr, ifp->name);
+ group = igmp_add_group_by_addr(igmp, group_addr);
if (!group) {
return;
}