diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index efd2a9202d68..396c631166a4 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2213,7 +2213,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) | |||
2213 | 2213 | ||
2214 | 2214 | ||
2215 | if (oldflp->oif) { | 2215 | if (oldflp->oif) { |
2216 | dev_out = dev_get_by_index(oldflp->oif); | 2216 | dev_out = dev_get_by_index(&init_net, oldflp->oif); |
2217 | err = -ENODEV; | 2217 | err = -ENODEV; |
2218 | if (dev_out == NULL) | 2218 | if (dev_out == NULL) |
2219 | goto out; | 2219 | goto out; |
@@ -2592,7 +2592,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2592 | if (iif) { | 2592 | if (iif) { |
2593 | struct net_device *dev; | 2593 | struct net_device *dev; |
2594 | 2594 | ||
2595 | dev = __dev_get_by_index(iif); | 2595 | dev = __dev_get_by_index(&init_net, iif); |
2596 | if (dev == NULL) { | 2596 | if (dev == NULL) { |
2597 | err = -ENODEV; | 2597 | err = -ENODEV; |
2598 | goto errout_free; | 2598 | goto errout_free; |