]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests: mptcp: pm: restrict 'unknown' check to pm_nl_ctl
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 5 May 2026 15:00:59 +0000 (17:00 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 May 2026 01:16:45 +0000 (18:16 -0700)
When pm_netlink.sh is executed with '-i', 'ip mptcp' is used instead of
'pm_nl_ctl'. IPRoute2 doesn't support the 'unknown' flag, which has only
been added to 'pm_nl_ctl' for this specific check: to ensure that the
kernel ignores such unsupported flag.

No reason to add this flag to 'ip mptcp'. Then, this check should be
skipped when 'ip mptcp' is used.

Fixes: 0cef6fcac24d ("selftests: mptcp: ip_mptcp option for more scripts")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260505-net-mptcp-pm-fixes-7-1-rc3-v1-11-fca8091060a4@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/pm_netlink.sh

index b69f30fcb91e96ce0961af163c7566103995e372..04594dfc22b134aba61c055c1a14699098def58b 100755 (executable)
@@ -194,9 +194,13 @@ check "show_endpoints" \
 flush_endpoint
 check "show_endpoints" "" "flush addrs"
 
-add_endpoint 10.0.1.1 flags unknown
-check "show_endpoints" "$(format_endpoints "1,10.0.1.1")" "ignore unknown flags"
-flush_endpoint
+# "unknown" flag is only supported by pm_nl_ctl
+if ! mptcp_lib_is_ip_mptcp; then
+       add_endpoint 10.0.1.1 flags unknown
+       check "show_endpoints" "$(format_endpoints "1,10.0.1.1")" \
+             "ignore unknown flags"
+       flush_endpoint
+fi
 
 set_limits 9 1 2>/dev/null
 check "get_limits" "${default_limits}" "rcv addrs above hard limit"