diff options
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 5eea6fa506e5..c11c76cab371 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -107,6 +107,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
107 | char __user *optval, int optlen) | 107 | char __user *optval, int optlen) |
108 | { | 108 | { |
109 | struct ipv6_pinfo *np = inet6_sk(sk); | 109 | struct ipv6_pinfo *np = inet6_sk(sk); |
110 | struct net *net = sk->sk_net; | ||
110 | int val, valbool; | 111 | int val, valbool; |
111 | int retv = -ENOPROTOOPT; | 112 | int retv = -ENOPROTOOPT; |
112 | 113 | ||
@@ -432,7 +433,7 @@ done: | |||
432 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) | 433 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) |
433 | goto e_inval; | 434 | goto e_inval; |
434 | 435 | ||
435 | if (__dev_get_by_index(&init_net, val) == NULL) { | 436 | if (__dev_get_by_index(net, val) == NULL) { |
436 | retv = -ENODEV; | 437 | retv = -ENODEV; |
437 | break; | 438 | break; |
438 | } | 439 | } |