diff options
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r-- | net/ipv6/anycast.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 0bd665498d06..d407992c1481 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
@@ -112,10 +112,10 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, struct in6_addr *addr) | |||
112 | } else { | 112 | } else { |
113 | /* router, no matching interface: just pick one */ | 113 | /* router, no matching interface: just pick one */ |
114 | 114 | ||
115 | dev = dev_get_by_flags(IFF_UP, IFF_UP|IFF_LOOPBACK); | 115 | dev = dev_get_by_flags(&init_net, IFF_UP, IFF_UP|IFF_LOOPBACK); |
116 | } | 116 | } |
117 | } else | 117 | } else |
118 | dev = dev_get_by_index(ifindex); | 118 | dev = dev_get_by_index(&init_net, ifindex); |
119 | 119 | ||
120 | if (dev == NULL) { | 120 | if (dev == NULL) { |
121 | err = -ENODEV; | 121 | err = -ENODEV; |
@@ -196,7 +196,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr) | |||
196 | 196 | ||
197 | write_unlock_bh(&ipv6_sk_ac_lock); | 197 | write_unlock_bh(&ipv6_sk_ac_lock); |
198 | 198 | ||
199 | dev = dev_get_by_index(pac->acl_ifindex); | 199 | dev = dev_get_by_index(&init_net, pac->acl_ifindex); |
200 | if (dev) { | 200 | if (dev) { |
201 | ipv6_dev_ac_dec(dev, &pac->acl_addr); | 201 | ipv6_dev_ac_dec(dev, &pac->acl_addr); |
202 | dev_put(dev); | 202 | dev_put(dev); |
@@ -224,7 +224,7 @@ void ipv6_sock_ac_close(struct sock *sk) | |||
224 | if (pac->acl_ifindex != prev_index) { | 224 | if (pac->acl_ifindex != prev_index) { |
225 | if (dev) | 225 | if (dev) |
226 | dev_put(dev); | 226 | dev_put(dev); |
227 | dev = dev_get_by_index(pac->acl_ifindex); | 227 | dev = dev_get_by_index(&init_net, pac->acl_ifindex); |
228 | prev_index = pac->acl_ifindex; | 228 | prev_index = pac->acl_ifindex; |
229 | } | 229 | } |
230 | if (dev) | 230 | if (dev) |
@@ -429,7 +429,7 @@ int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr) | |||
429 | if (dev) | 429 | if (dev) |
430 | return ipv6_chk_acast_dev(dev, addr); | 430 | return ipv6_chk_acast_dev(dev, addr); |
431 | read_lock(&dev_base_lock); | 431 | read_lock(&dev_base_lock); |
432 | for_each_netdev(dev) | 432 | for_each_netdev(&init_net, dev) |
433 | if (ipv6_chk_acast_dev(dev, addr)) { | 433 | if (ipv6_chk_acast_dev(dev, addr)) { |
434 | found = 1; | 434 | found = 1; |
435 | break; | 435 | break; |
@@ -453,7 +453,7 @@ static inline struct ifacaddr6 *ac6_get_first(struct seq_file *seq) | |||
453 | struct ac6_iter_state *state = ac6_seq_private(seq); | 453 | struct ac6_iter_state *state = ac6_seq_private(seq); |
454 | 454 | ||
455 | state->idev = NULL; | 455 | state->idev = NULL; |
456 | for_each_netdev(state->dev) { | 456 | for_each_netdev(&init_net, state->dev) { |
457 | struct inet6_dev *idev; | 457 | struct inet6_dev *idev; |
458 | idev = in6_dev_get(state->dev); | 458 | idev = in6_dev_get(state->dev); |
459 | if (!idev) | 459 | if (!idev) |