diff options
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r-- | net/ipv4/igmp.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 2769dc4a4c84..6203ece53606 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -8,8 +8,6 @@ | |||
8 | * the older version didn't come out right using gcc 2.5.8, the newer one | 8 | * the older version didn't come out right using gcc 2.5.8, the newer one |
9 | * seems to fall out with gcc 2.6.2. | 9 | * seems to fall out with gcc 2.6.2. |
10 | * | 10 | * |
11 | * Version: $Id: igmp.c,v 1.47 2002/02/01 22:01:03 davem Exp $ | ||
12 | * | ||
13 | * Authors: | 11 | * Authors: |
14 | * Alan Cox <Alan.Cox@linux.org> | 12 | * Alan Cox <Alan.Cox@linux.org> |
15 | * | 13 | * |
@@ -1198,7 +1196,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1198 | 1196 | ||
1199 | ASSERT_RTNL(); | 1197 | ASSERT_RTNL(); |
1200 | 1198 | ||
1201 | if (dev_net(in_dev->dev) != &init_net) | 1199 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1202 | return; | 1200 | return; |
1203 | 1201 | ||
1204 | for (im=in_dev->mc_list; im; im=im->next) { | 1202 | for (im=in_dev->mc_list; im; im=im->next) { |
@@ -1280,7 +1278,7 @@ void ip_mc_dec_group(struct in_device *in_dev, __be32 addr) | |||
1280 | 1278 | ||
1281 | ASSERT_RTNL(); | 1279 | ASSERT_RTNL(); |
1282 | 1280 | ||
1283 | if (dev_net(in_dev->dev) != &init_net) | 1281 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1284 | return; | 1282 | return; |
1285 | 1283 | ||
1286 | for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { | 1284 | for (ip=&in_dev->mc_list; (i=*ip)!=NULL; ip=&i->next) { |
@@ -1310,7 +1308,7 @@ void ip_mc_down(struct in_device *in_dev) | |||
1310 | 1308 | ||
1311 | ASSERT_RTNL(); | 1309 | ASSERT_RTNL(); |
1312 | 1310 | ||
1313 | if (dev_net(in_dev->dev) != &init_net) | 1311 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1314 | return; | 1312 | return; |
1315 | 1313 | ||
1316 | for (i=in_dev->mc_list; i; i=i->next) | 1314 | for (i=in_dev->mc_list; i; i=i->next) |
@@ -1333,7 +1331,7 @@ void ip_mc_init_dev(struct in_device *in_dev) | |||
1333 | { | 1331 | { |
1334 | ASSERT_RTNL(); | 1332 | ASSERT_RTNL(); |
1335 | 1333 | ||
1336 | if (dev_net(in_dev->dev) != &init_net) | 1334 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1337 | return; | 1335 | return; |
1338 | 1336 | ||
1339 | in_dev->mc_tomb = NULL; | 1337 | in_dev->mc_tomb = NULL; |
@@ -1359,7 +1357,7 @@ void ip_mc_up(struct in_device *in_dev) | |||
1359 | 1357 | ||
1360 | ASSERT_RTNL(); | 1358 | ASSERT_RTNL(); |
1361 | 1359 | ||
1362 | if (dev_net(in_dev->dev) != &init_net) | 1360 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1363 | return; | 1361 | return; |
1364 | 1362 | ||
1365 | ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); | 1363 | ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); |
@@ -1378,7 +1376,7 @@ void ip_mc_destroy_dev(struct in_device *in_dev) | |||
1378 | 1376 | ||
1379 | ASSERT_RTNL(); | 1377 | ASSERT_RTNL(); |
1380 | 1378 | ||
1381 | if (dev_net(in_dev->dev) != &init_net) | 1379 | if (!net_eq(dev_net(in_dev->dev), &init_net)) |
1382 | return; | 1380 | return; |
1383 | 1381 | ||
1384 | /* Deactivate timers */ | 1382 | /* Deactivate timers */ |
@@ -1762,7 +1760,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr) | |||
1762 | if (!ipv4_is_multicast(addr)) | 1760 | if (!ipv4_is_multicast(addr)) |
1763 | return -EINVAL; | 1761 | return -EINVAL; |
1764 | 1762 | ||
1765 | if (sock_net(sk) != &init_net) | 1763 | if (!net_eq(sock_net(sk), &init_net)) |
1766 | return -EPROTONOSUPPORT; | 1764 | return -EPROTONOSUPPORT; |
1767 | 1765 | ||
1768 | rtnl_lock(); | 1766 | rtnl_lock(); |
@@ -1833,7 +1831,7 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr) | |||
1833 | u32 ifindex; | 1831 | u32 ifindex; |
1834 | int ret = -EADDRNOTAVAIL; | 1832 | int ret = -EADDRNOTAVAIL; |
1835 | 1833 | ||
1836 | if (sock_net(sk) != &init_net) | 1834 | if (!net_eq(sock_net(sk), &init_net)) |
1837 | return -EPROTONOSUPPORT; | 1835 | return -EPROTONOSUPPORT; |
1838 | 1836 | ||
1839 | rtnl_lock(); | 1837 | rtnl_lock(); |
@@ -1881,7 +1879,7 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct | |||
1881 | if (!ipv4_is_multicast(addr)) | 1879 | if (!ipv4_is_multicast(addr)) |
1882 | return -EINVAL; | 1880 | return -EINVAL; |
1883 | 1881 | ||
1884 | if (sock_net(sk) != &init_net) | 1882 | if (!net_eq(sock_net(sk), &init_net)) |
1885 | return -EPROTONOSUPPORT; | 1883 | return -EPROTONOSUPPORT; |
1886 | 1884 | ||
1887 | rtnl_lock(); | 1885 | rtnl_lock(); |
@@ -2017,7 +2015,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) | |||
2017 | msf->imsf_fmode != MCAST_EXCLUDE) | 2015 | msf->imsf_fmode != MCAST_EXCLUDE) |
2018 | return -EINVAL; | 2016 | return -EINVAL; |
2019 | 2017 | ||
2020 | if (sock_net(sk) != &init_net) | 2018 | if (!net_eq(sock_net(sk), &init_net)) |
2021 | return -EPROTONOSUPPORT; | 2019 | return -EPROTONOSUPPORT; |
2022 | 2020 | ||
2023 | rtnl_lock(); | 2021 | rtnl_lock(); |
@@ -2100,7 +2098,7 @@ int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, | |||
2100 | if (!ipv4_is_multicast(addr)) | 2098 | if (!ipv4_is_multicast(addr)) |
2101 | return -EINVAL; | 2099 | return -EINVAL; |
2102 | 2100 | ||
2103 | if (sock_net(sk) != &init_net) | 2101 | if (!net_eq(sock_net(sk), &init_net)) |
2104 | return -EPROTONOSUPPORT; | 2102 | return -EPROTONOSUPPORT; |
2105 | 2103 | ||
2106 | rtnl_lock(); | 2104 | rtnl_lock(); |
@@ -2165,7 +2163,7 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, | |||
2165 | if (!ipv4_is_multicast(addr)) | 2163 | if (!ipv4_is_multicast(addr)) |
2166 | return -EINVAL; | 2164 | return -EINVAL; |
2167 | 2165 | ||
2168 | if (sock_net(sk) != &init_net) | 2166 | if (!net_eq(sock_net(sk), &init_net)) |
2169 | return -EPROTONOSUPPORT; | 2167 | return -EPROTONOSUPPORT; |
2170 | 2168 | ||
2171 | rtnl_lock(); | 2169 | rtnl_lock(); |
@@ -2252,7 +2250,7 @@ void ip_mc_drop_socket(struct sock *sk) | |||
2252 | if (inet->mc_list == NULL) | 2250 | if (inet->mc_list == NULL) |
2253 | return; | 2251 | return; |
2254 | 2252 | ||
2255 | if (sock_net(sk) != &init_net) | 2253 | if (!net_eq(sock_net(sk), &init_net)) |
2256 | return; | 2254 | return; |
2257 | 2255 | ||
2258 | rtnl_lock(); | 2256 | rtnl_lock(); |