mptcp: add subflow_v(4,6)_send_synack()
authorDmytro Shytyi <dmytro@shytyi.net>
Fri, 25 Nov 2022 22:29:51 +0000 (23:29 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 30 Nov 2022 04:24:25 +0000 (20:24 -0800)
commit36b122baf6a8bd46b4a591f12f4ed17b22257408
treeec7cb63c0adeacab7199cac9c0722899543686e1
parentdfc8d06030335a816d81aa92fe5d1f84d06998ad
mptcp: add subflow_v(4,6)_send_synack()

The send_synack() needs to be overridden for MPTCP to support TFO for
two reasons:

- There is not be enough space in the TCP options if the TFO cookie has
  to be added in the SYN+ACK with other options: MSS (4), SACK OK (2),
  Timestamps (10), Window Scale (3+1), TFO (10+2), MP_CAPABLE (12).
  MPTCPv1 specs -- RFC 8684, section B.1 [1] -- suggest to drop the TCP
  timestamps option in this case.

- The data received in the SYN has to be handled: the SKB can be
  dequeued from the subflow sk and transferred to the MPTCP sk. Counters
  need to be updated accordingly and the application can be notified at
  the end because some bytes have been received.

[1] https://www.rfc-editor.org/rfc/rfc8684.html#section-b.1

Co-developed-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/fastopen.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c