[NET]: Make the device list and device lookups per namespace.
[deliverable/linux.git] / net / ipv6 / ipv6_sockglue.c
index 6b038aa72e88b51fe77554bc4cab65af072ef2e8..eb330a44bacdf48d3fd03b720d4d33347bd3b016 100644 (file)
@@ -249,7 +249,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
                        }
 
                        if (ipv6_only_sock(sk) ||
-                           !(ipv6_addr_type(&np->daddr) & IPV6_ADDR_MAPPED)) {
+                           !ipv6_addr_v4mapped(&np->daddr)) {
                                retv = -EADDRNOTAVAIL;
                                break;
                        }
@@ -542,7 +542,7 @@ done:
                if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
                        goto e_inval;
 
-               if (__dev_get_by_index(val) == NULL) {
+               if (__dev_get_by_index(&init_net, val) == NULL) {
                        retv = -ENODEV;
                        break;
                }
This page took 0.030807 seconds and 5 git commands to generate.