mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-15 13:49:36 +02:00
mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
commit0137a3c7c2
upstream. The limits might have changed in between, it is best to check them before accepting new ADD_ADDR. Fixes:d0876b2284
("mptcp: add the incoming RM_ADDR support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-10-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d20bf2c96d
commit
9907af6a28
|
@ -856,7 +856,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
|
|||
/* Note: if the subflow has been closed before, this
|
||||
* add_addr_accepted counter will not be decremented.
|
||||
*/
|
||||
msk->pm.add_addr_accepted--;
|
||||
if (--msk->pm.add_addr_accepted < mptcp_pm_get_add_addr_accept_max(msk))
|
||||
WRITE_ONCE(msk->pm.accept_addr, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user