selftest/tcp-ao: Set routes in a proper VRF table id
authorDmitry Safonov <dima@arista.com>
Fri, 22 Dec 2023 01:59:06 +0000 (01:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2024 13:27:48 +0000 (13:27 +0000)
commit72cd9f8d5a9925fb8ccedaf9b42ccf5fc955a716
tree262e1a2acdcec23b944bd2defdb3473a71d3611e
parenta27359abc820c619c67e91241e75d045decbfdc2
selftest/tcp-ao: Set routes in a proper VRF table id

In unsigned-md5 selftests ip_route_add() is not needed in
client_add_ip(): the route was pre-setup in __test_init() => link_init()
for subnet, rather than a specific ip-address.

Currently, __ip_route_add() mistakenly always sets VRF table
to RT_TABLE_MAIN - this seems to have sneaked in during unsigned-md5
tests debugging. That also explains, why ip_route_add_vrf() ignored
EEXIST, returned by fib6.

Yet, keep EEXIST ignoring in bench-lookups selftests as it's expected
that those selftests may add the same (duplicate) routes.

Reported-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tcp_ao/bench-lookups.c
tools/testing/selftests/net/tcp_ao/lib/netlink.c
tools/testing/selftests/net/tcp_ao/unsigned-md5.c