Commit 0ae0d60a authored by Hangbin Liu's avatar Hangbin Liu Committed by David S. Miller

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: 6e2059b5 (ipv4/igmp: init group mode as INCLUDE when join source group)
Fixes: c7ea20c9 (ipv6/mcast: init as INCLUDE when join SSM INCLUDE group)
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ef324779
...@@ -1289,7 +1289,7 @@ static void igmp_group_dropped(struct ip_mc_list *im) ...@@ -1289,7 +1289,7 @@ static void igmp_group_dropped(struct ip_mc_list *im)
#endif #endif
} }
static void igmp_group_added(struct ip_mc_list *im, unsigned int mode) static void igmp_group_added(struct ip_mc_list *im)
{ {
struct in_device *in_dev = im->interface; struct in_device *in_dev = im->interface;
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
...@@ -1321,7 +1321,7 @@ static void igmp_group_added(struct ip_mc_list *im, unsigned int mode) ...@@ -1321,7 +1321,7 @@ static void igmp_group_added(struct ip_mc_list *im, unsigned int mode)
* not send filter-mode change record as the mode should be from * not send filter-mode change record as the mode should be from
* IN() to IN(A). * IN() to IN(A).
*/ */
if (mode == MCAST_EXCLUDE) if (im->sfmode == MCAST_EXCLUDE)
im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv; im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv;
igmp_ifc_event(in_dev); igmp_ifc_event(in_dev);
...@@ -1432,7 +1432,7 @@ void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr, unsigned int mode) ...@@ -1432,7 +1432,7 @@ void __ip_mc_inc_group(struct in_device *in_dev, __be32 addr, unsigned int mode)
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
igmpv3_del_delrec(in_dev, im); igmpv3_del_delrec(in_dev, im);
#endif #endif
igmp_group_added(im, mode); igmp_group_added(im);
if (!in_dev->dead) if (!in_dev->dead)
ip_rt_multicast_event(in_dev); ip_rt_multicast_event(in_dev);
out: out:
...@@ -1699,7 +1699,7 @@ void ip_mc_remap(struct in_device *in_dev) ...@@ -1699,7 +1699,7 @@ void ip_mc_remap(struct in_device *in_dev)
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
igmpv3_del_delrec(in_dev, pmc); igmpv3_del_delrec(in_dev, pmc);
#endif #endif
igmp_group_added(pmc, pmc->sfmode); igmp_group_added(pmc);
} }
} }
...@@ -1762,7 +1762,7 @@ void ip_mc_up(struct in_device *in_dev) ...@@ -1762,7 +1762,7 @@ void ip_mc_up(struct in_device *in_dev)
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
igmpv3_del_delrec(in_dev, pmc); igmpv3_del_delrec(in_dev, pmc);
#endif #endif
igmp_group_added(pmc, pmc->sfmode); igmp_group_added(pmc);
} }
} }
......
...@@ -660,7 +660,7 @@ bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr, ...@@ -660,7 +660,7 @@ bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr,
return rv; return rv;
} }
static void igmp6_group_added(struct ifmcaddr6 *mc, unsigned int mode) static void igmp6_group_added(struct ifmcaddr6 *mc)
{ {
struct net_device *dev = mc->idev->dev; struct net_device *dev = mc->idev->dev;
char buf[MAX_ADDR_LEN]; char buf[MAX_ADDR_LEN];
...@@ -690,7 +690,7 @@ static void igmp6_group_added(struct ifmcaddr6 *mc, unsigned int mode) ...@@ -690,7 +690,7 @@ static void igmp6_group_added(struct ifmcaddr6 *mc, unsigned int mode)
* should not send filter-mode change record as the mode * should not send filter-mode change record as the mode
* should be from IN() to IN(A). * should be from IN() to IN(A).
*/ */
if (mode == MCAST_EXCLUDE) if (mc->mca_sfmode == MCAST_EXCLUDE)
mc->mca_crcount = mc->idev->mc_qrv; mc->mca_crcount = mc->idev->mc_qrv;
mld_ifc_event(mc->idev); mld_ifc_event(mc->idev);
...@@ -932,7 +932,7 @@ static int __ipv6_dev_mc_inc(struct net_device *dev, ...@@ -932,7 +932,7 @@ static int __ipv6_dev_mc_inc(struct net_device *dev,
write_unlock_bh(&idev->lock); write_unlock_bh(&idev->lock);
mld_del_delrec(idev, mc); mld_del_delrec(idev, mc);
igmp6_group_added(mc, mode); igmp6_group_added(mc);
ma_put(mc); ma_put(mc);
return 0; return 0;
} }
...@@ -2572,7 +2572,7 @@ void ipv6_mc_up(struct inet6_dev *idev) ...@@ -2572,7 +2572,7 @@ void ipv6_mc_up(struct inet6_dev *idev)
ipv6_mc_reset(idev); ipv6_mc_reset(idev);
for (i = idev->mc_list; i; i = i->next) { for (i = idev->mc_list; i; i = i->next) {
mld_del_delrec(idev, i); mld_del_delrec(idev, i);
igmp6_group_added(i, i->mca_sfmode); igmp6_group_added(i);
} }
read_unlock_bh(&idev->lock); read_unlock_bh(&idev->lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment