This is a note to let you know that I've just added the patch titled selftests: mptcp: join: use 'iptables-legacy' if available to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-mptcp-join-use-iptables-legacy-if-available.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable-owner@xxxxxxxxxxxxxxx Thu Jun 22 15:35:00 2023 From: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> Date: Thu, 22 Jun 2023 15:34:31 +0200 Subject: selftests: mptcp: join: use 'iptables-legacy' if available To: stable@xxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx Cc: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx> Message-ID: <20230622133431.3216631-1-matthieu.baerts@xxxxxxxxxxxx> From: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx Signed-off-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -12,6 +12,8 @@ cinfail="" cinsent="" cout="" ksft_skip=4 +iptables="iptables" +ip6tables="ip6tables" timeout_poll=30 timeout_test=$((timeout_poll * 2 + 1)) mptcp_connect="" @@ -126,9 +128,9 @@ reset_with_add_addr_timeout() local ip="${1:-4}" local tables - tables="iptables" + tables="${iptables}" if [ $ip -eq 6 ]; then - tables="ip6tables" + tables="${ip6tables}" fi reset @@ -171,8 +173,10 @@ if [ $? -ne 0 ];then exit $ksft_skip fi -iptables -V > /dev/null 2>&1 -if [ $? -ne 0 ];then +if iptables-legacy -V &> /dev/null; then + iptables="iptables-legacy" + ip6tables="ip6tables-legacy" +elif ! iptables -V &> /dev/null; then echo "SKIP: Could not run all tests without iptables tool" exit $ksft_skip fi Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-5.15/selftests-mptcp-join-use-iptables-legacy-if-available.patch queue-5.15/selftests-mptcp-pm-nl-remove-hardcoded-default-limits.patch queue-5.15/selftests-mptcp-join-skip-check-if-mib-counter-not-supported.patch