aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/test_vxlan_under_vrf.sh
diff options
context:
space:
mode:
authorAlexis Bauvin <abauvin@scaleway.com>2018-12-03 10:54:40 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-03 14:15:26 -0800
commitaab8cc3630e325065a70740438dc0a47035fcdc8 (patch)
tree0630db9f0e96d01cd15cb12ed3ad18bc2387d3f5 /tools/testing/selftests/net/test_vxlan_under_vrf.sh
parentl3mdev: add function to retreive upper master (diff)
downloadlinux-dev-aab8cc3630e325065a70740438dc0a47035fcdc8.tar.xz
linux-dev-aab8cc3630e325065a70740438dc0a47035fcdc8.zip
vxlan: add support for underlay in non-default VRF
Creating a VXLAN device with is underlay in the non-default VRF makes egress route lookup fail or incorrect since it will resolve in the default VRF, and ingress fail because the socket listens in the default VRF. This patch binds the underlying UDP tunnel socket to the l3mdev of the lower device of the VXLAN device. This will listen in the proper VRF and output traffic from said l3mdev, matching l3mdev routing rules and looking up the correct routing table. When the VXLAN device does not have a lower device, or the lower device is in the default VRF, the socket will not be bound to any interface, keeping the previous behaviour. The underlay l3mdev is deduced from the VXLAN lower device (IFLA_VXLAN_LINK). +----------+ +---------+ | | | | | vrf-blue | | vrf-red | | | | | +----+-----+ +----+----+ | | | | +----+-----+ +----+----+ | | | | | br-blue | | br-red | | | | | +----+-----+ +---+-+---+ | | | | +-----+ +-----+ | | | +----+-----+ +------+----+ +----+----+ | | lower device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | | | | | | +----------+ +-----------+ +---------+ Signed-off-by: Alexis Bauvin <abauvin@scaleway.com> Reviewed-by: Amine Kherbouche <akherbouche@scaleway.com> Reviewed-by: David Ahern <dsahern@gmail.com> Tested-by: Amine Kherbouche <akherbouche@scaleway.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions