Skip to content

Commit f9a45d1

Browse files
Gang Yanintel-lab-lkp
authored andcommitted
selftests: mptcp: add a testcase for invalid addr timeout
This patch adds a timeout testcase, which includes a invalid address within the same LAN, along with another valid address. The invalid address in the LAN triggers a TCP error, leading to an incorrect increment of 'add_addr_accepted'. This test ensures the valid address can still join in this situation. Signed-off-by: Gang Yan <[email protected]>
1 parent d4954a2 commit f9a45d1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,20 @@ add_addr_timeout_tests()
23182318
chk_join_nr 1 1 1
23192319
chk_add_nr 8 0
23202320
fi
2321+
2322+
# signal invalid LAN addresses, which will cause an error at TCP level
2323+
if reset_with_add_addr_timeout "invalid LAN address, ADD_ADDR timeout"; then
2324+
pm_nl_set_limits $ns1 2 2
2325+
pm_nl_add_endpoint $ns1 10.0.1.3 flags signal
2326+
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
2327+
pm_nl_set_limits $ns2 2 2
2328+
2329+
speed=10 \
2330+
run_tests $ns1 $ns2 10.0.1.1
2331+
join_syn_tx=+2 \
2332+
chk_join_nr 1 1 1
2333+
chk_add_nr 8 0
2334+
fi
23212335
}
23222336

23232337
remove_tests()

0 commit comments

Comments
 (0)