aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 682f632bfb77..6250f4239b61 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1762,7 +1762,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
1762 if (!ipv4_is_multicast(addr)) 1762 if (!ipv4_is_multicast(addr))
1763 return -EINVAL; 1763 return -EINVAL;
1764 1764
1765 if (sk->sk_net != &init_net) 1765 if (sock_net(sk) != &init_net)
1766 return -EPROTONOSUPPORT; 1766 return -EPROTONOSUPPORT;
1767 1767
1768 rtnl_lock(); 1768 rtnl_lock();
@@ -1833,7 +1833,7 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr)
1833 u32 ifindex; 1833 u32 ifindex;
1834 int ret = -EADDRNOTAVAIL; 1834 int ret = -EADDRNOTAVAIL;
1835 1835
1836 if (sk->sk_net != &init_net) 1836 if (sock_net(sk) != &init_net)
1837 return -EPROTONOSUPPORT; 1837 return -EPROTONOSUPPORT;
1838 1838
1839 rtnl_lock(); 1839 rtnl_lock();
@@ -1881,7 +1881,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
1881 if (!ipv4_is_multicast(addr)) 1881 if (!ipv4_is_multicast(addr))
1882 return -EINVAL; 1882 return -EINVAL;
1883 1883
1884 if (sk->sk_net != &init_net) 1884 if (sock_net(sk) != &init_net)
1885 return -EPROTONOSUPPORT; 1885 return -EPROTONOSUPPORT;
1886 1886
1887 rtnl_lock(); 1887 rtnl_lock();
@@ -2017,7 +2017,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
2017 msf->imsf_fmode != MCAST_EXCLUDE) 2017 msf->imsf_fmode != MCAST_EXCLUDE)
2018 return -EINVAL; 2018 return -EINVAL;
2019 2019
2020 if (sk->sk_net != &init_net) 2020 if (sock_net(sk) != &init_net)
2021 return -EPROTONOSUPPORT; 2021 return -EPROTONOSUPPORT;
2022 2022
2023 rtnl_lock(); 2023 rtnl_lock();
@@ -2100,7 +2100,7 @@ int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
2100 if (!ipv4_is_multicast(addr)) 2100 if (!ipv4_is_multicast(addr))
2101 return -EINVAL; 2101 return -EINVAL;
2102 2102
2103 if (sk->sk_net != &init_net) 2103 if (sock_net(sk) != &init_net)
2104 return -EPROTONOSUPPORT; 2104 return -EPROTONOSUPPORT;
2105 2105
2106 rtnl_lock(); 2106 rtnl_lock();
@@ -2165,7 +2165,7 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
2165 if (!ipv4_is_multicast(addr)) 2165 if (!ipv4_is_multicast(addr))
2166 return -EINVAL; 2166 return -EINVAL;
2167 2167
2168 if (sk->sk_net != &init_net) 2168 if (sock_net(sk) != &init_net)
2169 return -EPROTONOSUPPORT; 2169 return -EPROTONOSUPPORT;
2170 2170
2171 rtnl_lock(); 2171 rtnl_lock();
@@ -2252,7 +2252,7 @@ void ip_mc_drop_socket(struct sock *sk)
2252 if (inet->mc_list == NULL) 2252 if (inet->mc_list == NULL)
2253 return; 2253 return;
2254 2254
2255 if (sk->sk_net != &init_net) 2255 if (sock_net(sk) != &init_net)
2256 return; 2256 return;
2257 2257
2258 rtnl_lock(); 2258 rtnl_lock();