summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 15:05:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 15:05:45 +0100
commit5593edfbfa30a049fca9abbd70a834d2888a4d9d (patch)
treea5c67524a82995fa17e44669c037fcced4fa91aa /net/ipv4/fib_semantics.c
parent113ccc38378b6f0b24c0993040c6044e35163a51 (diff)
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
downloadtalos-op-linux-5593edfbfa30a049fca9abbd70a834d2888a4d9d.tar.gz
talos-op-linux-5593edfbfa30a049fca9abbd70a834d2888a4d9d.zip
Merge 4.10-rc4 into driver-core-next
We want the sysfs file revert and other fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 7a5b4c7d9a87..eba1546b5031 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1618,8 +1618,13 @@ void fib_select_multipath(struct fib_result *res, int hash)
void fib_select_path(struct net *net, struct fib_result *res,
struct flowi4 *fl4, int mp_hash)
{
+ bool oif_check;
+
+ oif_check = (fl4->flowi4_oif == 0 ||
+ fl4->flowi4_flags & FLOWI_FLAG_SKIP_NH_OIF);
+
#ifdef CONFIG_IP_ROUTE_MULTIPATH
- if (res->fi->fib_nhs > 1 && fl4->flowi4_oif == 0) {
+ if (res->fi->fib_nhs > 1 && oif_check) {
if (mp_hash < 0)
mp_hash = get_hash_from_flowi4(fl4) >> 1;
@@ -1629,7 +1634,7 @@ void fib_select_path(struct net *net, struct fib_result *res,
#endif
if (!res->prefixlen &&
res->table->tb_num_default > 1 &&
- res->type == RTN_UNICAST && !fl4->flowi4_oif)
+ res->type == RTN_UNICAST && oif_check)
fib_select_default(fl4, res);
if (!fl4->saddr)
OpenPOWER on IntegriCloud