Skip to content

Commit

Permalink
selftests: mptcp: add a testcase for invalid addr timeout
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Gang Yan authored and intel-lab-lkp committed Jan 9, 2025
1 parent d4954a2 commit f9a45d1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,20 @@ add_addr_timeout_tests()
chk_join_nr 1 1 1
chk_add_nr 8 0
fi

# signal invalid LAN addresses, which will cause an error at TCP level
if reset_with_add_addr_timeout "invalid LAN address, ADD_ADDR timeout"; then
pm_nl_set_limits $ns1 2 2
pm_nl_add_endpoint $ns1 10.0.1.3 flags signal
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
pm_nl_set_limits $ns2 2 2

speed=10 \
run_tests $ns1 $ns2 10.0.1.1
join_syn_tx=+2 \
chk_join_nr 1 1 1
chk_add_nr 8 0
fi
}

remove_tests()
Expand Down

0 comments on commit f9a45d1

Please sign in to comment.