diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 52aeeca292b7b..7d1e89639ddc4 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2590,6 +2590,9 @@ static void __mptcp_close_subflow(struct sock *sk) continue; mptcp_close_ssk(sk, ssk, subflow); + if (READ_ONCE(subflow->remote_id) && + --msk->pm.add_addr_accepted < mptcp_pm_get_add_addr_accept_max(msk)) + WRITE_ONCE(msk->pm.accept_addr, true); } } diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index cd7016d1e47dc..dde8d6b2f893b 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2308,7 +2308,7 @@ add_addr_timeout_tests() pm_nl_set_limits $ns2 2 2 speed=10 \ run_tests $ns1 $ns2 10.0.1.1 - join_syn_tx=2 \ + join_syn_tx=$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTx") \ chk_join_nr 1 1 1 chk_add_nr 8 0 fi