Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79456
b: refs/heads/master
c: 86167a3
h: refs/heads/master
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Jan 28, 2008
1 parent 029c748 commit 469473a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b707aaae4ca7b7204eb4a472721c84866d85f0f
refs/heads/master: 86167a377f1c4fb40742302ae7682dd574abde86
12 changes: 6 additions & 6 deletions trunk/net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
struct fib_nh *nh)
{
int err;
struct net *net;

net = cfg->fc_nlinfo.nl_net;
if (nh->nh_gw) {
struct fib_result res;

Expand All @@ -532,11 +534,9 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,

if (cfg->fc_scope >= RT_SCOPE_LINK)
return -EINVAL;
if (inet_addr_type(cfg->fc_nlinfo.nl_net,
nh->nh_gw) != RTN_UNICAST)
if (inet_addr_type(net, nh->nh_gw) != RTN_UNICAST)
return -EINVAL;
if ((dev = __dev_get_by_index(cfg->fc_nlinfo.nl_net,
nh->nh_oif)) == NULL)
if ((dev = __dev_get_by_index(net, nh->nh_oif)) == NULL)
return -ENODEV;
if (!(dev->flags&IFF_UP))
return -ENETDOWN;
Expand All @@ -559,7 +559,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
/* It is not necessary, but requires a bit of thinking */
if (fl.fl4_scope < RT_SCOPE_LINK)
fl.fl4_scope = RT_SCOPE_LINK;
if ((err = fib_lookup(&init_net, &fl, &res)) != 0)
if ((err = fib_lookup(net, &fl, &res)) != 0)
return err;
}
err = -EINVAL;
Expand All @@ -583,7 +583,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
if (nh->nh_flags&(RTNH_F_PERVASIVE|RTNH_F_ONLINK))
return -EINVAL;

in_dev = inetdev_by_index(&init_net, nh->nh_oif);
in_dev = inetdev_by_index(net, nh->nh_oif);
if (in_dev == NULL)
return -ENODEV;
if (!(in_dev->dev->flags&IFF_UP)) {
Expand Down

0 comments on commit 469473a

Please sign in to comment.