Message ID | tencent_0FE3ED0442E69C9D86C0AEEE338A49F90305@qq.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [mptcp-next] mptcp: fix invalid addr occupy 'add_addr_accepted' | expand |
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 21bc3586c33e..f99dddca859d 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2569,6 +2569,10 @@ 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); } }