aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-14 08:36:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:06 -0500
commite5ba31f11f6cae785e893d5d10abd612fef0b6bc (patch)
tree9c4f4782fc52569218e6e9b1c8ab5c5820cd53eb /net/ipv6
parentf51d599fbecf4881a36466f0355da6b0b346ea70 (diff)
[NETNS][RAW]: Eliminate explicit init_net references.
Happily, in all the rest places (->bind callbacks only), that require the struct net, we have a socket, so get the net from it. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/raw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 026fa910cb70..970529e4754a 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -291,7 +291,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
291 if (!sk->sk_bound_dev_if) 291 if (!sk->sk_bound_dev_if)
292 goto out; 292 goto out;
293 293
294 dev = dev_get_by_index(&init_net, sk->sk_bound_dev_if); 294 dev = dev_get_by_index(sk->sk_net, sk->sk_bound_dev_if);
295 if (!dev) { 295 if (!dev) {
296 err = -ENODEV; 296 err = -ENODEV;
297 goto out; 297 goto out;
@@ -304,7 +304,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
304 v4addr = LOOPBACK4_IPV6; 304 v4addr = LOOPBACK4_IPV6;
305 if (!(addr_type & IPV6_ADDR_MULTICAST)) { 305 if (!(addr_type & IPV6_ADDR_MULTICAST)) {
306 err = -EADDRNOTAVAIL; 306 err = -EADDRNOTAVAIL;
307 if (!ipv6_chk_addr(&init_net, &addr->sin6_addr, 307 if (!ipv6_chk_addr(sk->sk_net, &addr->sin6_addr,
308 dev, 0)) { 308 dev, 0)) {
309 if (dev) 309 if (dev)
310 dev_put(dev); 310 dev_put(dev);