Skip to content

Commit 0ae0d60

Browse files
liuhangbindavem330
authored andcommitted
multicast: remove useless parameter for group add
Remove the mode parameter for igmp/igmp6_group_added as we can get it from first parameter. Fixes: 6e2059b (ipv4/igmp: init group mode as INCLUDE when join source group) Fixes: c7ea20c (ipv6/mcast: init as INCLUDE when join SSM INCLUDE group) Signed-off-by: Hangbin Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ef32477 commit 0ae0d60

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

net/ipv4/igmp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ static void igmp_group_dropped(struct ip_mc_list *im)
12891289
#endif
12901290
}
12911291

1292-
static void igmp_group_added(struct ip_mc_list *im, unsigned int mode)
1292+
static void igmp_group_added(struct ip_mc_list *im)
12931293
{
12941294
struct in_device *in_dev = im->interface;
12951295
#ifdef CONFIG_IP_MULTICAST
@@ -1321,7 +1321,7 @@ static void igmp_group_added(struct ip_mc_list *im, unsigned int mode)
13211321
* not send filter-mode change record as the mode should be from
13221322
* IN() to IN(A).
13231323
*/
1324-
if (mode == MCAST_EXCLUDE)
1324+
if (im->sfmode == MCAST_EXCLUDE)
13251325
im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv;
13261326

13271327
igmp_ifc_event(in_dev);
@@ -1432,7 +1432,7 @@ void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr, unsigned int mode)
14321432
#ifdef CONFIG_IP_MULTICAST
14331433
igmpv3_del_delrec(in_dev, im);
14341434
#endif
1435-
igmp_group_added(im, mode);
1435+
igmp_group_added(im);
14361436
if (!in_dev->dead)
14371437
ip_rt_multicast_event(in_dev);
14381438
out:
@@ -1699,7 +1699,7 @@ void ip_mc_remap(struct in_device *in_dev)
16991699
#ifdef CONFIG_IP_MULTICAST
17001700
igmpv3_del_delrec(in_dev, pmc);
17011701
#endif
1702-
igmp_group_added(pmc, pmc->sfmode);
1702+
igmp_group_added(pmc);
17031703
}
17041704
}
17051705

@@ -1762,7 +1762,7 @@ void ip_mc_up(struct in_device *in_dev)
17621762
#ifdef CONFIG_IP_MULTICAST
17631763
igmpv3_del_delrec(in_dev, pmc);
17641764
#endif
1765-
igmp_group_added(pmc, pmc->sfmode);
1765+
igmp_group_added(pmc);
17661766
}
17671767
}
17681768

net/ipv6/mcast.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr,
660660
return rv;
661661
}
662662

663-
static void igmp6_group_added(struct ifmcaddr6 *mc, unsigned int mode)
663+
static void igmp6_group_added(struct ifmcaddr6 *mc)
664664
{
665665
struct net_device *dev = mc->idev->dev;
666666
char buf[MAX_ADDR_LEN];
@@ -690,7 +690,7 @@ static void igmp6_group_added(struct ifmcaddr6 *mc, unsigned int mode)
690690
* should not send filter-mode change record as the mode
691691
* should be from IN() to IN(A).
692692
*/
693-
if (mode == MCAST_EXCLUDE)
693+
if (mc->mca_sfmode == MCAST_EXCLUDE)
694694
mc->mca_crcount = mc->idev->mc_qrv;
695695

696696
mld_ifc_event(mc->idev);
@@ -932,7 +932,7 @@ static int __ipv6_dev_mc_inc(struct net_device *dev,
932932
write_unlock_bh(&idev->lock);
933933

934934
mld_del_delrec(idev, mc);
935-
igmp6_group_added(mc, mode);
935+
igmp6_group_added(mc);
936936
ma_put(mc);
937937
return 0;
938938
}
@@ -2572,7 +2572,7 @@ void ipv6_mc_up(struct inet6_dev *idev)
25722572
ipv6_mc_reset(idev);
25732573
for (i = idev->mc_list; i; i = i->next) {
25742574
mld_del_delrec(idev, i);
2575-
igmp6_group_added(i, i->mca_sfmode);
2575+
igmp6_group_added(i);
25762576
}
25772577
read_unlock_bh(&idev->lock);
25782578
}

0 commit comments

Comments
 (0)