diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-09 22:27:33 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 22:27:33 -0700 |
commit | e548833df83c3554229eff0672900bfe958b45fd (patch) | |
tree | 85efc4a76dc356593d6d394776aeb845dc580fb6 /net/ipv4/fib_frontend.c | |
parent | cbd9da7be869f676afc204e1a664163778c770bd (diff) | |
parent | 053d8f6622701f849fda2ca2c9ae596c13599ba9 (diff) | |
download | linux-3.10-e548833df83c3554229eff0672900bfe958b45fd.tar.gz linux-3.10-e548833df83c3554229eff0672900bfe958b45fd.tar.bz2 linux-3.10-e548833df83c3554229eff0672900bfe958b45fd.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/main.c
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index a4396891835..7d02a9f999f 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -246,6 +246,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, struct fib_result res; int no_addr, rpf, accept_local; + bool dev_match; int ret; struct net *net; @@ -273,12 +274,22 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, } *spec_dst = FIB_RES_PREFSRC(res); fib_combine_itag(itag, &res); + dev_match = false; + #ifdef CONFIG_IP_ROUTE_MULTIPATH - if (FIB_RES_DEV(res) == dev || res.fi->fib_nhs > 1) + for (ret = 0; ret < res.fi->fib_nhs; ret++) { + struct fib_nh *nh = &res.fi->fib_nh[ret]; + + if (nh->nh_dev == dev) { + dev_match = true; + break; + } + } #else if (FIB_RES_DEV(res) == dev) + dev_match = true; #endif - { + if (dev_match) { ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; fib_res_put(&res); return ret; |