aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index c434119deb52..d30fb68d5f4e 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -533,7 +533,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
533 return -EINVAL; 533 return -EINVAL;
534 if (inet_addr_type(nh->nh_gw) != RTN_UNICAST) 534 if (inet_addr_type(nh->nh_gw) != RTN_UNICAST)
535 return -EINVAL; 535 return -EINVAL;
536 if ((dev = __dev_get_by_index(nh->nh_oif)) == NULL) 536 if ((dev = __dev_get_by_index(&init_net, nh->nh_oif)) == NULL)
537 return -ENODEV; 537 return -ENODEV;
538 if (!(dev->flags&IFF_UP)) 538 if (!(dev->flags&IFF_UP))
539 return -ENETDOWN; 539 return -ENETDOWN;
@@ -799,7 +799,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
799 if (nhs != 1 || nh->nh_gw) 799 if (nhs != 1 || nh->nh_gw)
800 goto err_inval; 800 goto err_inval;
801 nh->nh_scope = RT_SCOPE_NOWHERE; 801 nh->nh_scope = RT_SCOPE_NOWHERE;
802 nh->nh_dev = dev_get_by_index(fi->fib_nh->nh_oif); 802 nh->nh_dev = dev_get_by_index(&init_net, fi->fib_nh->nh_oif);
803 err = -ENODEV; 803 err = -ENODEV;
804 if (nh->nh_dev == NULL) 804 if (nh->nh_dev == NULL)
805 goto failure; 805 goto failure;