netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] mptcp: fix MP_JOIN failure handling
@ 2020-05-15 17:22 Paolo Abeni
  2020-05-15 17:22 ` [PATCH net-next v2 1/3] mptcp: add new sock flag to deal with join subflows Paolo Abeni
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Paolo Abeni @ 2020-05-15 17:22 UTC (permalink / raw)
  To: netdev
  Cc: Eric Dumazet, David S . Miller, Christoph Paasch, mptcp,
	Mat Martineau

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 tcp_request_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'.

v1 -> v2:
 - be more conservative about drop_req initialization

RFC -> v1:
 - move the drop_req bit inside tcp_request_sock (Eric)

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                |  3 +++
 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                | 18 ++++++++++++------
 7 files changed, 35 insertions(+), 26 deletions(-)

-- 
2.21.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-15 19:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15 17:22 [PATCH net-next v2 0/3] mptcp: fix MP_JOIN failure handling Paolo Abeni
2020-05-15 17:22 ` [PATCH net-next v2 1/3] mptcp: add new sock flag to deal with join subflows Paolo Abeni
2020-05-15 18:09   ` Mat Martineau
2020-05-15 18:29   ` Christoph Paasch
2020-05-15 17:22 ` [PATCH net-next v2 2/3] inet_connection_sock: factor out destroy helper Paolo Abeni
2020-05-15 18:09   ` Mat Martineau
2020-05-15 17:22 ` [PATCH net-next v2 3/3] mptcp: cope better with MP_JOIN failure Paolo Abeni
2020-05-15 18:10   ` Mat Martineau
2020-05-15 19:30 ` [PATCH net-next v2 0/3] mptcp: fix MP_JOIN failure handling David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).