selftests: mptcp: join: use 'iptables-legacy' if available
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Sat, 10 Jun 2023 16:11:37 +0000 (18:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:20 +0000 (11:12 +0200)
commit4d65ec947d24f48700efa09ec51480c83dea62ea
tree92d1d6823fcadf73de6363ab7250fed6d6fa591c
parent44d3366bf4b95ef4a9601158943f70942b57c39d
selftests: mptcp: join: use 'iptables-legacy' if available

commit 0c4cd3f86a40028845ad6f8af5b37165666404cd upstream.

IPTables commands using 'iptables-nft' fail on old kernels, at least
5.15 because it doesn't see the default IPTables chains:

  $ iptables -L
  iptables/1.8.2 Failed to initialize nft: Protocol not supported

As a first step before switching to NFTables, we can use iptables-legacy
if available.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Fixes: 8d014eaa9254 ("selftests: mptcp: add ADD_ADDR timeout test case")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh