diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-08-13 23:59:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-14 08:43:20 +0300 |
commit | 613d09b30f8b589d5a9b49775054c8865db95d1c (patch) | |
tree | 93178a4839a7caaca7b9318bc2736dc1c5676859 /net/ipv4/fib_trie.c | |
parent | cd2fbe1b6b517ca7c0e80b103c674fdf5bd50f76 (diff) | |
download | linux-613d09b30f8b589d5a9b49775054c8865db95d1c.tar.xz |
net: Use VRF device index for lookups on TX
As with ingress use the index of VRF master device for route lookups on
egress. However, the oif should only be used to direct the lookups to a
specific table. Routes in the table are not based on the VRF device but
rather interfaces that are part of the VRF so do not consider the oif for
lookups within the table. The FLOWI_FLAG_VRFSRC is used to control this
latter part.
Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 37c4bb89a708..1243c79cb5b0 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -1423,8 +1423,11 @@ found: nh->nh_flags & RTNH_F_LINKDOWN && !(fib_flags & FIB_LOOKUP_IGNORE_LINKSTATE)) continue; - if (flp->flowi4_oif && flp->flowi4_oif != nh->nh_oif) - continue; + if (!(flp->flowi4_flags & FLOWI_FLAG_VRFSRC)) { + if (flp->flowi4_oif && + flp->flowi4_oif != nh->nh_oif) + continue; + } if (!(fib_flags & FIB_LOOKUP_NOREF)) atomic_inc(&fi->fib_clntref); |