Skip to content

Commit 131af3d

Browse files
matttbegregkh
authored andcommitted
selftests: mptcp: join: fix local endp not being tracked
commit c5d5ecf upstream. When running this mptcp_join.sh selftest on older kernel versions not supporting local endpoints tracking, this test fails because 3 MP_JOIN ACKs have been received, while only 2 were expected. It is not clear why only 2 MP_JOIN ACKs were expected on old kernel versions, while 3 MP_JOIN SYN and SYN+ACK were expected. When testing on the v5.15.197 kernel, 3 MP_JOIN ACKs are seen, which is also what is expected in the selftests included in this kernel version, see commit f4480ea ("selftests: mptcp: add missing join check"). Switch the expected MP_JOIN ACKs to 3. While at it, move this chk_join_nr helper out of the special condition for older kernel versions as it is now the same as with more recent ones. Also, invert the condition to be more logical: what's expected on newer kernel versions having such helper first. Fixes: d4c81bb ("selftests: mptcp: join: support local endpoint being tracked or not") 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/20260127-net-mptcp-dup-nl-events-v1-5-7f71e1bc4feb@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e73aab3 commit 131af3d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,17 +2305,16 @@ signal_address_tests()
23052305
ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=1
23062306
speed=slow \
23072307
run_tests $ns1 $ns2 10.0.1.1
2308+
chk_join_nr 3 3 3
23082309

23092310
# It is not directly linked to the commit introducing this
23102311
# symbol but for the parent one which is linked anyway.
2311-
if ! mptcp_lib_kallsyms_has "mptcp_pm_subflow_check_next$"; then
2312-
chk_join_nr 3 3 2
2313-
chk_add_nr 4 4
2314-
else
2315-
chk_join_nr 3 3 3
2312+
if mptcp_lib_kallsyms_has "mptcp_pm_subflow_check_next$"; then
23162313
# the server will not signal the address terminating
23172314
# the MPC subflow
23182315
chk_add_nr 3 3
2316+
else
2317+
chk_add_nr 4 4
23192318
fi
23202319
fi
23212320
}

0 commit comments

Comments
 (0)