Skip to content

Commit

Permalink
selftests: mptcp: rm subflow with v4/v4mapped addr
Browse files Browse the repository at this point in the history
Now both a v4 address and a v4-mapped address are supported when
destroying a userspace pm subflow, this patch adds random tests for both
addresses.

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and intel-lab-lkp committed Nov 28, 2023
1 parent 3b4a8a8 commit bbbde69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3304,12 +3304,13 @@ userspace_pm_rm_sf()
{
local evts=$evts_ns1
local t=${3:-1}
local ip=4
local ip
local tk da dp sp
local cnt

[ "$1" == "$ns2" ] && evts=$evts_ns2
if mptcp_lib_is_v6 $2; then ip=6; fi
[ -n "$(mptcp_lib_evts_get_info "saddr4" "$evts" $t)" ] && ip=4
[ -n "$(mptcp_lib_evts_get_info "saddr6" "$evts" $t)" ] && ip=6
tk=$(mptcp_lib_evts_get_info token "$evts")
da=$(mptcp_lib_evts_get_info "daddr$ip" "$evts" $t)
dp=$(mptcp_lib_evts_get_info dport "$evts" $t)
Expand Down Expand Up @@ -3415,7 +3416,7 @@ userspace_tests()
userspace_pm_rm_addr $ns1 10
userspace_pm_rm_sf $ns1 ::ffff:10.0.2.1 $SUB_ESTABLISHED
else
userspace_pm_rm_sf $ns1 ::ffff:10.0.2.1 $SUB_ESTABLISHED
userspace_pm_rm_sf $ns1 10.0.2.1 $SUB_ESTABLISHED
userspace_pm_rm_addr $ns1 10
fi
chk_rm_nr 1 1 invert
Expand Down

0 comments on commit bbbde69

Please sign in to comment.