]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: mptcp: sockopt: use 'iptables-legacy' if available
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Tue, 4 Jul 2023 20:44:36 +0000 (22:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:24:19 +0000 (10:24 +0200)
commit0ab95d5ce8be4b7410d04b116dc61de9a5d28350
treefe01106e9414378a6592ff6246baa02153055c8c
parentbd2decac7345134ea0bd3f4b978478ef53367cd8
selftests: mptcp: sockopt: use 'iptables-legacy' if available

commit a5a5990c099dd354e05e89ee77cd2dbf6655d4a1 upstream.

IPTables commands using 'iptables-nft' fail on old kernels, at least
on v5.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: dc65fe82fb07 ("selftests: mptcp: add packet mark test case")
Cc: stable@vger.kernel.org
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh