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 bbd4a247b19..c1263e23876 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -531,7 +531,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
531 531
532 if (cfg->fc_scope >= RT_SCOPE_LINK) 532 if (cfg->fc_scope >= RT_SCOPE_LINK)
533 return -EINVAL; 533 return -EINVAL;
534 if (inet_addr_type(nh->nh_gw) != RTN_UNICAST) 534 if (inet_addr_type(&init_net, nh->nh_gw) != RTN_UNICAST)
535 return -EINVAL; 535 return -EINVAL;
536 if ((dev = __dev_get_by_index(&init_net, nh->nh_oif)) == NULL) 536 if ((dev = __dev_get_by_index(&init_net, nh->nh_oif)) == NULL)
537 return -ENODEV; 537 return -ENODEV;
@@ -809,7 +809,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
809 if (fi->fib_prefsrc) { 809 if (fi->fib_prefsrc) {
810 if (cfg->fc_type != RTN_LOCAL || !cfg->fc_dst || 810 if (cfg->fc_type != RTN_LOCAL || !cfg->fc_dst ||
811 fi->fib_prefsrc != cfg->fc_dst) 811 fi->fib_prefsrc != cfg->fc_dst)
812 if (inet_addr_type(fi->fib_prefsrc) != RTN_LOCAL) 812 if (inet_addr_type(&init_net, fi->fib_prefsrc) != RTN_LOCAL)
813 goto err_inval; 813 goto err_inval;
814 } 814 }
815 815