diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index ab0507e7c467e9..19cfe44b35a260 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -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) @@ -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