OpenCloudOS-Kernel/net/mptcp
Florian Westphal c83a47e50d mptcp: subflow: add mptcp_subflow_init_cookie_req helper
Will be used to initialize the mptcp request socket when a MP_CAPABLE
request was handled in syncookie mode, i.e. when a TCP ACK containing a
MP_CAPABLE option is a valid syncookie value.

Normally (non-cookie case), MPTCP will generate a unique 32 bit connection
ID and stores it in the MPTCP token storage to be able to retrieve the
mptcp socket for subflow joining.

In syncookie case, we do not want to store any state, so just generate the
unique ID and use it in the reply.

This means there is a small window where another connection could generate
the same token.

When Cookie ACK comes back, we check that the token has not been registered
in the mean time.  If it was, the connection needs to fall back to TCP.

Changes in v2:
 - use req->syncookie instead of passing 'want_cookie' arg to ->init_req()
   (Eric Dumazet)

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-31 16:55:32 -07:00
..
Kconfig mptcp: add MPTCP socket diag interface 2020-07-09 12:38:41 -07:00
Makefile mptcp: add MPTCP socket diag interface 2020-07-09 12:38:41 -07:00
crypto.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: new sysctl to control the activation per NS 2020-01-24 13:44:08 +01:00
diag.c mptcp: allow dumping subflow context to userspace 2020-03-29 22:14:48 -07:00
mib.c mptcp: add and use MIB counter infrastructure 2020-03-29 22:14:49 -07:00
mib.h mptcp: add and use MIB counter infrastructure 2020-03-29 22:14:49 -07:00
mptcp_diag.c mptcp: add MPTCP socket diag interface 2020-07-09 12:38:41 -07:00
options.c mptcp: Skip unnecessary skb extension allocation for bare acks 2020-07-28 17:02:42 -07:00
pm.c mptcp: use mptcp worker for path management 2020-07-07 13:02:13 -07:00
pm_netlink.c mptcp: add __init annotation on setup functions 2020-06-26 16:21:39 -07:00
protocol.c mptcp: Safely store sequence number when sending data 2020-07-28 17:02:42 -07:00
protocol.h mptcp: subflow: add mptcp_subflow_init_cookie_req helper 2020-07-31 16:55:32 -07:00
subflow.c mptcp: subflow: add mptcp_subflow_init_cookie_req helper 2020-07-31 16:55:32 -07:00
token.c mptcp: subflow: add mptcp_subflow_init_cookie_req helper 2020-07-31 16:55:32 -07:00
token_test.c mptcp: introduce token KUNIT self-tests 2020-06-26 16:21:39 -07:00