mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 18:04:03 +00:00
pimd: Remove unnecessary parameter
We were already passing in the interface name, no need to do it twice. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
9c1e09ba8e
commit
9bd7302f90
@ -173,4 +173,7 @@ void igmp_startup_mode_on(struct igmp_sock *igmp);
|
|||||||
void igmp_group_timer_on(struct igmp_group *group,
|
void igmp_group_timer_on(struct igmp_group *group,
|
||||||
long interval_msec, const char *ifname);
|
long interval_msec, const char *ifname);
|
||||||
|
|
||||||
|
struct igmp_source *
|
||||||
|
source_new (struct igmp_group *group,
|
||||||
|
struct in_addr src_addr);
|
||||||
#endif /* PIM_IGMP_H */
|
#endif /* PIM_IGMP_H */
|
||||||
|
@ -477,9 +477,9 @@ struct igmp_source *igmp_find_source_by_addr(struct igmp_group *group,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct igmp_source *source_new(struct igmp_group *group,
|
struct igmp_source *
|
||||||
struct in_addr src_addr,
|
source_new (struct igmp_group *group,
|
||||||
const char *ifname)
|
struct in_addr src_addr)
|
||||||
{
|
{
|
||||||
struct igmp_source *src;
|
struct igmp_source *src;
|
||||||
|
|
||||||
@ -491,7 +491,7 @@ static struct igmp_source *source_new(struct igmp_group *group,
|
|||||||
zlog_debug("Creating new IGMP source %s for group %s on socket %d interface %s",
|
zlog_debug("Creating new IGMP source %s for group %s on socket %d interface %s",
|
||||||
source_str, group_str,
|
source_str, group_str,
|
||||||
group->group_igmp_sock->fd,
|
group->group_igmp_sock->fd,
|
||||||
ifname);
|
group->group_igmp_sock->interface->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
src = XMALLOC(MTYPE_PIM_IGMP_GROUP_SOURCE, sizeof(*src));
|
src = XMALLOC(MTYPE_PIM_IGMP_GROUP_SOURCE, sizeof(*src));
|
||||||
@ -501,13 +501,13 @@ static struct igmp_source *source_new(struct igmp_group *group,
|
|||||||
return 0; /* error, not found, could not create */
|
return 0; /* error, not found, could not create */
|
||||||
}
|
}
|
||||||
|
|
||||||
src->t_source_timer = 0;
|
src->t_source_timer = NULL;
|
||||||
src->source_group = group; /* back pointer */
|
src->source_group = group; /* back pointer */
|
||||||
src->source_addr = src_addr;
|
src->source_addr = src_addr;
|
||||||
src->source_creation = pim_time_monotonic_sec();
|
src->source_creation = pim_time_monotonic_sec();
|
||||||
src->source_flags = 0;
|
src->source_flags = 0;
|
||||||
src->source_query_retransmit_count = 0;
|
src->source_query_retransmit_count = 0;
|
||||||
src->source_channel_oil = 0;
|
src->source_channel_oil = NULL;
|
||||||
|
|
||||||
listnode_add(group->group_source_list, src);
|
listnode_add(group->group_source_list, src);
|
||||||
|
|
||||||
@ -521,8 +521,7 @@ static struct igmp_source *source_new(struct igmp_group *group,
|
|||||||
|
|
||||||
static struct igmp_source *add_source_by_addr(struct igmp_sock *igmp,
|
static struct igmp_source *add_source_by_addr(struct igmp_sock *igmp,
|
||||||
struct igmp_group *group,
|
struct igmp_group *group,
|
||||||
struct in_addr src_addr,
|
struct in_addr src_addr)
|
||||||
const char *ifname)
|
|
||||||
{
|
{
|
||||||
struct igmp_source *src;
|
struct igmp_source *src;
|
||||||
|
|
||||||
@ -531,7 +530,7 @@ static struct igmp_source *add_source_by_addr(struct igmp_sock *igmp,
|
|||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
|
|
||||||
src = source_new(group, src_addr, ifname);
|
src = source_new(group, src_addr);
|
||||||
if (!src) {
|
if (!src) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -560,7 +559,7 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
|
|||||||
|
|
||||||
src_addr = sources + i;
|
src_addr = sources + i;
|
||||||
|
|
||||||
source = add_source_by_addr(igmp, group, *src_addr, ifp->name);
|
source = add_source_by_addr(igmp, group, *src_addr);
|
||||||
if (!source) {
|
if (!source) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -616,8 +615,7 @@ static void isex_excl(struct igmp_group *group,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* E.4: if not found, create source with timer=GMI: (A-X-Y) */
|
/* E.4: if not found, create source with timer=GMI: (A-X-Y) */
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -659,8 +657,7 @@ static void isex_incl(struct igmp_group *group,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* I.4: if not found, create source with timer=0 (B-A) */
|
/* I.4: if not found, create source with timer=0 (B-A) */
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -737,8 +734,7 @@ static void toin_incl(struct igmp_group *group,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If not found, create new source */
|
/* If not found, create new source */
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -783,8 +779,7 @@ static void toin_excl(struct igmp_group *group,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If not found, create new source */
|
/* If not found, create new source */
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -862,8 +857,7 @@ static void toex_incl(struct igmp_group *group,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If source not found, create source with timer=0: (B-A)=0 */
|
/* If source not found, create source with timer=0: (B-A)=0 */
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -916,8 +910,7 @@ static void toex_excl(struct igmp_group *group,
|
|||||||
else {
|
else {
|
||||||
/* if not found, create source with Group Timer: (A-X-Y)=Group Timer */
|
/* if not found, create source with Group Timer: (A-X-Y)=Group Timer */
|
||||||
long group_timer_msec;
|
long group_timer_msec;
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
@ -1421,8 +1414,7 @@ static void block_excl(struct igmp_group *group,
|
|||||||
if (!source) {
|
if (!source) {
|
||||||
/* 3: if not found, create source with Group Timer: (A-X-Y)=Group Timer */
|
/* 3: if not found, create source with Group Timer: (A-X-Y)=Group Timer */
|
||||||
long group_timer_msec;
|
long group_timer_msec;
|
||||||
source = source_new(group, *src_addr,
|
source = source_new(group, *src_addr);
|
||||||
group->group_igmp_sock->interface->name);
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
/* ugh, internal malloc failure, skip source */
|
/* ugh, internal malloc failure, skip source */
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user