Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79455
b: refs/heads/master
c: 5b707aa
h: refs/heads/master
i:
  79453: 16b9813
  79451: 319d95d
  79447: 5b1db24
  79439: d3a8b55
  79423: 2339b27
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Jan 28, 2008
1 parent fb886f2 commit 029c748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 7fee0ca23711ce1a6b13d3ab78915809a72a59ec
refs/heads/master: 5b707aaae4ca7b7204eb4a472721c84866d85f0f
6 changes: 4 additions & 2 deletions trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
struct fib_result res;
int no_addr, rpf;
int ret;
struct net *net;

no_addr = rpf = 0;
rcu_read_lock();
Expand All @@ -241,7 +242,8 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
if (in_dev == NULL)
goto e_inval;

if (fib_lookup(&init_net, &fl, &res))
net = dev->nd_net;
if (fib_lookup(net, &fl, &res))
goto last_resort;
if (res.type != RTN_UNICAST)
goto e_inval_res;
Expand All @@ -265,7 +267,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
fl.oif = dev->ifindex;

ret = 0;
if (fib_lookup(&init_net, &fl, &res) == 0) {
if (fib_lookup(net, &fl, &res) == 0) {
if (res.type == RTN_UNICAST) {
*spec_dst = FIB_RES_PREFSRC(res);
ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST;
Expand Down

0 comments on commit 029c748

Please sign in to comment.