]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Jun 2023 09:30:39 +0000 (11:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Jun 2023 09:30:39 +0000 (11:30 +0200)
added patches:
selftests-mptcp-sockopt-skip-tcp_inq-checks-if-not-supported.patch

queue-6.1/selftests-mptcp-sockopt-skip-tcp_inq-checks-if-not-supported.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/selftests-mptcp-sockopt-skip-tcp_inq-checks-if-not-supported.patch b/queue-6.1/selftests-mptcp-sockopt-skip-tcp_inq-checks-if-not-supported.patch
new file mode 100644 (file)
index 0000000..c22a89b
--- /dev/null
@@ -0,0 +1,72 @@
+From matthieu.baerts@tessares.net Thu Jun 22 11:17:19 2023
+From: Matthieu Baerts <matthieu.baerts@tessares.net>
+Date: Thu, 22 Jun 2023 11:17:09 +0200
+Subject: selftests: mptcp: sockopt: skip TCP_INQ checks if not supported
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: Matthieu Baerts <matthieu.baerts@tessares.net>, Jakub Kicinski <kuba@kernel.org>
+Message-ID: <20230622091709.2857780-1-matthieu.baerts@tessares.net>
+
+From: Matthieu Baerts <matthieu.baerts@tessares.net>
+
+commit b631e3a4e94c77c9007d60b577a069c203ce9594 upstream.
+
+Selftests are supposed to run on any kernels, including the old ones not
+supporting all MPTCP features.
+
+One of them is TCP_INQ cmsg support introduced in commit 2c9e77659a0c
+("mptcp: add TCP_INQ cmsg support").
+
+It is possible to look for "mptcp_ioctl" in kallsyms because it was
+needed to introduce the mentioned feature. We can skip these tests and
+not set TCPINQ option if the feature is not supported.
+
+Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
+Fixes: 5cbd886ce2a9 ("selftests: mptcp: add TCP_INQ support")
+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: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/mptcp/mptcp_sockopt.sh |   14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
++++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
+@@ -182,9 +182,14 @@ do_transfer()
+               local_addr="0.0.0.0"
+       fi
++      cmsg="TIMESTAMPNS"
++      if mptcp_lib_kallsyms_has "mptcp_ioctl$"; then
++              cmsg+=",TCPINQ"
++      fi
++
+       timeout ${timeout_test} \
+               ip netns exec ${listener_ns} \
+-                      $mptcp_connect -t ${timeout_poll} -l -M 1 -p $port -s ${srv_proto} -c TIMESTAMPNS,TCPINQ \
++                      $mptcp_connect -t ${timeout_poll} -l -M 1 -p $port -s ${srv_proto} -c "${cmsg}" \
+                               ${local_addr} < "$sin" > "$sout" &
+       spid=$!
+@@ -192,7 +197,7 @@ do_transfer()
+       timeout ${timeout_test} \
+               ip netns exec ${connector_ns} \
+-                      $mptcp_connect -t ${timeout_poll} -M 2 -p $port -s ${cl_proto} -c TIMESTAMPNS,TCPINQ \
++                      $mptcp_connect -t ${timeout_poll} -M 2 -p $port -s ${cl_proto} -c "${cmsg}" \
+                               $connect_addr < "$cin" > "$cout" &
+       cpid=$!
+@@ -311,6 +316,11 @@ do_tcpinq_tests()
+       ip netns exec "$ns1" iptables -F
+       ip netns exec "$ns1" ip6tables -F
++      if ! mptcp_lib_kallsyms_has "mptcp_ioctl$"; then
++              echo "INFO: TCP_INQ not supported: SKIP"
++              return
++      fi
++
+       for args in "-t tcp" "-r tcp"; do
+               do_tcpinq_test $args
+               lret=$?
index 1e1472248bd9d204e542944a09b0f1ca163d2272..2e1c53d28d6ce229ffa850e2b627ca5dfdc1431f 100644 (file)
@@ -35,3 +35,4 @@ selftests-mptcp-join-skip-fullmesh-flag-tests-if-not-supported.patch
 selftests-mptcp-join-skip-mpc-backups-tests-if-not-supported.patch
 selftests-mount_setattr-fix-redefine-struct-mount_attr-build-error.patch
 selftests-mptcp-diag-skip-listen-tests-if-not-supported.patch
+selftests-mptcp-sockopt-skip-tcp_inq-checks-if-not-supported.patch