diff options
author | Ido Schimmel <idosch@nvidia.com> | 2022-08-09 14:33:20 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-10 22:36:14 -0700 |
commit | 8bcfb4ae4d970b9a9724ddfbac26c387934e0e94 (patch) | |
tree | 3797aa61784af5591639951616b1502e10f96687 /usr | |
parent | fbe8870f72e8e71bb57b883d29c600aaaca6cd20 (diff) | |
download | linux-stable-8bcfb4ae4d970b9a9724ddfbac26c387934e0e94.tar.gz linux-stable-8bcfb4ae4d970b9a9724ddfbac26c387934e0e94.tar.bz2 linux-stable-8bcfb4ae4d970b9a9724ddfbac26c387934e0e94.zip |
selftests: forwarding: Fix failing tests with old libnet
The custom multipath hash tests use mausezahn in order to test how
changes in various packet fields affect the packet distribution across
the available nexthops.
The tool uses the libnet library for various low-level packet
construction and injection. The library started using the
"SO_BINDTODEVICE" socket option for IPv6 sockets in version 1.1.6 and
for IPv4 sockets in version 1.2.
When the option is not set, packets are not routed according to the
table associated with the VRF master device and tests fail.
Fix this by prefixing the command with "ip vrf exec", which will cause
the route lookup to occur in the VRF routing table. This makes the tests
pass regardless of the libnet library version.
Fixes: 511e8db54036 ("selftests: forwarding: Add test for custom multipath hash")
Fixes: 185b0c190bb6 ("selftests: forwarding: Add test for custom multipath hash with IPv4 GRE")
Fixes: b7715acba4d3 ("selftests: forwarding: Add test for custom multipath hash with IPv6 GRE")
Reported-by: Ivan Vecera <ivecera@redhat.com>
Tested-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://lore.kernel.org/r/20220809113320.751413-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions