Skip to content

RFC mptcp: fix MP_JOIN failure handling

Paolo Abeni netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mptcp: add new sock flag to deal with join subflowsinclude/linux/tcp.h include/net/mptcp.h net/ipv4/tcp_minisocks.c +2 more+14 -152 replies
2/3inet_connection_sock: factor out destroy helper.include/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c+9 -50 replies
3/3mptcp: cope better with MP_JOIN failurenet/mptcp/subflow.c+9 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] mptcp: fix MP_JOIN failure handling

Currently if we hit an MP_JOIN failure on the third ack, the child socket is closed with reset, but the request socket is not deleted, causing weird behaviors.

The main problem is that MPTCP's MP_JOIN code needs to plug it's own 'valid 3rd ack' checks and the current TCP callbacks do not allow that.

This series tries to address the above shortcoming introducing a new MPTCP specific bit in a 'struct sock' hole, and leveraging that to allow tcp_check_req releasing the request socket when needed.

The above allows cleaning-up a bit current MPTCP hooking in tcp_check_req().

An alternative solution, possibly cleaner but more invasive, would be changing the 'bool *own_req' syn_recv_sock() argument into 'int *req_status' and let MPTCP set it to 'REQ_DROP'.

Paolo Abeni (3):
mptcp: add new sock flag to deal with join subflows
inet_connection_sock: factor out destroy helper.
mptcp: cope better with MP_JOIN failure

 include/linux/tcp.h                |  1 +
 include/net/inet_connection_sock.h |  8 ++++++++
 include/net/mptcp.h                | 17 ++++++++++-------
 net/ipv4/inet_connection_sock.c    |  6 +-----
 net/ipv4/tcp_minisocks.c           |  2 +-
 net/mptcp/protocol.c               |  7 -------
 net/mptcp/subflow.c                | 17 +++++++++++------
 7 files changed, 32 insertions(+), 26 deletions(-)
Signature · 1 line
2.21.3