diff options
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index efb0047f6880..12c7a1560977 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -76,7 +76,7 @@ static struct sock *__raw_v6_lookup(struct net *net, struct sock *sk, | |||
76 | if (inet_sk(sk)->num == num) { | 76 | if (inet_sk(sk)->num == num) { |
77 | struct ipv6_pinfo *np = inet6_sk(sk); | 77 | struct ipv6_pinfo *np = inet6_sk(sk); |
78 | 78 | ||
79 | if (sk->sk_net != net) | 79 | if (sock_net(sk) != net) |
80 | continue; | 80 | continue; |
81 | 81 | ||
82 | if (!ipv6_addr_any(&np->daddr) && | 82 | if (!ipv6_addr_any(&np->daddr) && |
@@ -280,7 +280,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
280 | if (!sk->sk_bound_dev_if) | 280 | if (!sk->sk_bound_dev_if) |
281 | goto out; | 281 | goto out; |
282 | 282 | ||
283 | dev = dev_get_by_index(sk->sk_net, sk->sk_bound_dev_if); | 283 | dev = dev_get_by_index(sock_net(sk), sk->sk_bound_dev_if); |
284 | if (!dev) { | 284 | if (!dev) { |
285 | err = -ENODEV; | 285 | err = -ENODEV; |
286 | goto out; | 286 | goto out; |
@@ -293,7 +293,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
293 | v4addr = LOOPBACK4_IPV6; | 293 | v4addr = LOOPBACK4_IPV6; |
294 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { | 294 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { |
295 | err = -EADDRNOTAVAIL; | 295 | err = -EADDRNOTAVAIL; |
296 | if (!ipv6_chk_addr(sk->sk_net, &addr->sin6_addr, | 296 | if (!ipv6_chk_addr(sock_net(sk), &addr->sin6_addr, |
297 | dev, 0)) { | 297 | dev, 0)) { |
298 | if (dev) | 298 | if (dev) |
299 | dev_put(dev); | 299 | dev_put(dev); |