mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00
mptcp: add TCP_FASTOPEN_NO_COOKIE support
The goal of this socket option is to configure MPTCP + TFO without cookie per socket. It was already possible to enable TFO without a cookie per netns by setting net.ipv4.tcp_fastopen sysctl knob to the right value. Per route was also supported by setting 'fastopen_no_cookie' option. This patch adds a per socket support like it is possible to do with TCP thanks to TCP_FASTOPEN_NO_COOKIE socket option. The only thing to do here is to relay the request to the first subflow like it is already done for TCP_FASTOPEN_CONNECT. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
d3d429047c
commit
e64d4deb4d
1 changed files with 5 additions and 2 deletions
|
@ -560,6 +560,7 @@ static bool mptcp_supported_sockopt(int level, int optname)
|
|||
case TCP_TX_DELAY:
|
||||
case TCP_INQ:
|
||||
case TCP_FASTOPEN_CONNECT:
|
||||
case TCP_FASTOPEN_NO_COOKIE:
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -568,8 +569,8 @@ static bool mptcp_supported_sockopt(int level, int optname)
|
|||
/* TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
|
||||
* TCP_REPAIR_WINDOW are not supported, better avoid this mess
|
||||
*/
|
||||
/* TCP_FASTOPEN_KEY, TCP_FASTOPEN, TCP_FASTOPEN_NO_COOKIE,
|
||||
* are not supported fastopen is currently unsupported
|
||||
/* TCP_FASTOPEN_KEY, TCP_FASTOPEN are not supported because
|
||||
* fastopen for the listener side is currently unsupported
|
||||
*/
|
||||
}
|
||||
return false;
|
||||
|
@ -811,6 +812,7 @@ static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
|
|||
case TCP_DEFER_ACCEPT:
|
||||
return mptcp_setsockopt_sol_tcp_defer(msk, optval, optlen);
|
||||
case TCP_FASTOPEN_CONNECT:
|
||||
case TCP_FASTOPEN_NO_COOKIE:
|
||||
return mptcp_setsockopt_first_sf_only(msk, SOL_TCP, optname,
|
||||
optval, optlen);
|
||||
}
|
||||
|
@ -1175,6 +1177,7 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
|
|||
case TCP_CC_INFO:
|
||||
case TCP_DEFER_ACCEPT:
|
||||
case TCP_FASTOPEN_CONNECT:
|
||||
case TCP_FASTOPEN_NO_COOKIE:
|
||||
return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
|
||||
optval, optlen);
|
||||
case TCP_INQ:
|
||||
|
|
Loading…
Add table
Reference in a new issue