diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-01-06 16:20:16 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-07 11:27:06 +0000 |
commit | b29fcfb54cd70caca5b11c80d8d238854938884a (patch) | |
tree | ce6469a982603e3dddbe67c5c3205b961324e437 /net/mptcp/token.c | |
parent | f284c0c7732189fa77567dc061c5f4205c4fa05b (diff) |
mptcp: full disconnect implementation
The current mptcp_disconnect() implementation lacks several
steps, we additionally need to reset the msk socket state
and flush the subflow list.
Factor out the needed helper to avoid code duplication.
Additionally ensure that the initial subflow is disposed
only after mptcp_close(), just reset it at disconnect time.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/token.c')
-rw-r--r-- | net/mptcp/token.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/token.c b/net/mptcp/token.c index e581b341c5be..f52ee7b26aed 100644 --- a/net/mptcp/token.c +++ b/net/mptcp/token.c @@ -384,6 +384,7 @@ void mptcp_token_destroy(struct mptcp_sock *msk) bucket->chain_len--; } spin_unlock_bh(&bucket->lock); + WRITE_ONCE(msk->token, 0); } void __init mptcp_token_init(void) |