diff options
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r-- | net/ipv4/igmp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 6a4ee8da6994..6250f4239b61 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -130,12 +130,12 @@ | |||
130 | */ | 130 | */ |
131 | 131 | ||
132 | #define IGMP_V1_SEEN(in_dev) \ | 132 | #define IGMP_V1_SEEN(in_dev) \ |
133 | (IPV4_DEVCONF_ALL(in_dev->dev->nd_net, FORCE_IGMP_VERSION) == 1 || \ | 133 | (IPV4_DEVCONF_ALL(dev_net(in_dev->dev), FORCE_IGMP_VERSION) == 1 || \ |
134 | IN_DEV_CONF_GET((in_dev), FORCE_IGMP_VERSION) == 1 || \ | 134 | IN_DEV_CONF_GET((in_dev), FORCE_IGMP_VERSION) == 1 || \ |
135 | ((in_dev)->mr_v1_seen && \ | 135 | ((in_dev)->mr_v1_seen && \ |
136 | time_before(jiffies, (in_dev)->mr_v1_seen))) | 136 | time_before(jiffies, (in_dev)->mr_v1_seen))) |
137 | #define IGMP_V2_SEEN(in_dev) \ | 137 | #define IGMP_V2_SEEN(in_dev) \ |
138 | (IPV4_DEVCONF_ALL(in_dev->dev->nd_net, FORCE_IGMP_VERSION) == 2 || \ | 138 | (IPV4_DEVCONF_ALL(dev_net(in_dev->dev), FORCE_IGMP_VERSION) == 2 || \ |
139 | IN_DEV_CONF_GET((in_dev), FORCE_IGMP_VERSION) == 2 || \ | 139 | IN_DEV_CONF_GET((in_dev), FORCE_IGMP_VERSION) == 2 || \ |
140 | ((in_dev)->mr_v2_seen && \ | 140 | ((in_dev)->mr_v2_seen && \ |
141 | time_before(jiffies, (in_dev)->mr_v2_seen))) | 141 | time_before(jiffies, (in_dev)->mr_v2_seen))) |
@@ -1198,7 +1198,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1198 | 1198 | ||
1199 | ASSERT_RTNL(); | 1199 | ASSERT_RTNL(); |
1200 | 1200 | ||
1201 | if (in_dev->dev->nd_net != &init_net) | 1201 | if (dev_net(in_dev->dev) != &init_net) |
1202 | return; | 1202 | return; |
1203 | 1203 | ||
1204 | for (im=in_dev->mc_list; im; im=im->next) { | 1204 | for (im=in_dev->mc_list; im; im=im->next) { |
@@ -1280,7 +1280,7 @@ void ip_mc_dec_group(struct in_device *in_dev, __be32 addr) | |||
1280 | 1280 | ||
1281 | ASSERT_RTNL(); | 1281 | ASSERT_RTNL(); |
1282 | 1282 | ||
1283 | if (in_dev->dev->nd_net != &init_net) | 1283 | if (dev_net(in_dev->dev) != &init_net) |
1284 | return; | 1284 | return; |
1285 | 1285 | ||
1286 | for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { | 1286 | for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { |
@@ -1310,7 +1310,7 @@ void ip_mc_down(struct in_device *in_dev) | |||
1310 | 1310 | ||
1311 | ASSERT_RTNL(); | 1311 | ASSERT_RTNL(); |
1312 | 1312 | ||
1313 | if (in_dev->dev->nd_net != &init_net) | 1313 | if (dev_net(in_dev->dev) != &init_net) |
1314 | return; | 1314 | return; |
1315 | 1315 | ||
1316 | for (i=in_dev->mc_list; i; i=i->next) | 1316 | for (i=in_dev->mc_list; i; i=i->next) |
@@ -1333,7 +1333,7 @@ void ip_mc_init_dev(struct in_device *in_dev) | |||
1333 | { | 1333 | { |
1334 | ASSERT_RTNL(); | 1334 | ASSERT_RTNL(); |
1335 | 1335 | ||
1336 | if (in_dev->dev->nd_net != &init_net) | 1336 | if (dev_net(in_dev->dev) != &init_net) |
1337 | return; | 1337 | return; |
1338 | 1338 | ||
1339 | in_dev->mc_tomb = NULL; | 1339 | in_dev->mc_tomb = NULL; |
@@ -1359,7 +1359,7 @@ void ip_mc_up(struct in_device *in_dev) | |||
1359 | 1359 | ||
1360 | ASSERT_RTNL(); | 1360 | ASSERT_RTNL(); |
1361 | 1361 | ||
1362 | if (in_dev->dev->nd_net != &init_net) | 1362 | if (dev_net(in_dev->dev) != &init_net) |
1363 | return; | 1363 | return; |
1364 | 1364 | ||
1365 | ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); | 1365 | ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); |
@@ -1378,7 +1378,7 @@ void ip_mc_destroy_dev(struct in_device *in_dev) | |||
1378 | 1378 | ||
1379 | ASSERT_RTNL(); | 1379 | ASSERT_RTNL(); |
1380 | 1380 | ||
1381 | if (in_dev->dev->nd_net != &init_net) | 1381 | if (dev_net(in_dev->dev) != &init_net) |
1382 | return; | 1382 | return; |
1383 | 1383 | ||
1384 | /* Deactivate timers */ | 1384 | /* Deactivate timers */ |
@@ -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(); |