All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Kishen Maloor <kishen.maloor@intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v5 5/8] mptcp: netlink: store per namespace list of refcounted listen socks
Date: Thu, 3 Feb 2022 18:46:37 +0100	[thread overview]
Message-ID: <20220203174637.GC4901@breakpoint.cc> (raw)
In-Reply-To: <20220203072508.3072309-6-kishen.maloor@intel.com>

Kishen Maloor <kishen.maloor@intel.com> wrote:
> The kernel can create listening sockets bound to announced addresses
> via the ADD_ADDR option for receiving MP_JOIN requests. Path
> managers may further choose to advertise the same addr+port over multiple
> MPTCP connections. So this change provides a simple framework to
> manage a list of all distinct listning sockets created in the kernel
> over a namespace by encapsulating the socket in a structure that is
> ref counted and can be shared across multiple connections. The sockets
> are released when there are no more references.

I think it makes sense to work on a hook in tcp v4/v6 input path
that gets called for th->syn && !th->ack && no-listener-found case.

The hook would:
1. retrieve join token, fetch mptcp_sock and allow 3whs to continue
   if things look ok from mptcp p.o.v.
2. return "go ahead and send tcp rst" or "mptcp magic, skb stolen"
to the tcp stack.

This also makes sure that plain tcp or mptcp connect requests will
not work for addresses that did not go through socket/bind/listen API.

I will try to prototype something next week.

Given that hook lives in an error path (from tcp point of view)
I think its going to be OK from a upstreaming point of view.

It hopefully avoids the need for "magic listener sockets", and avoids
kernel fighting with userspace applications over which address:port
pairs are really useable.

The latter is a concern IMO, esp. with reuseport and other round-robin
schemes, I don't want mptcp layer to interfere with other application
running on same host.

  reply	other threads:[~2022-02-03 18:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  7:25 [PATCH mptcp-next v5 0/8] mptcp: fixes and enhancements related to path management Kishen Maloor
2022-02-03  7:25 ` [PATCH mptcp-next v5 1/8] mptcp: bypass in-kernel PM restrictions for non-kernel PMs Kishen Maloor
2022-02-03  7:25 ` [PATCH mptcp-next v5 2/8] mptcp: store remote id from MP_JOIN SYN/ACK in local ctx Kishen Maloor
2022-02-03  7:25 ` [PATCH mptcp-next v5 3/8] mptcp: reflect remote port (not 0) in ANNOUNCED events Kishen Maloor
2022-02-03  7:25 ` [PATCH mptcp-next v5 4/8] mptcp: establish subflows from either end of connection Kishen Maloor
2022-02-03  7:25 ` [PATCH mptcp-next v5 5/8] mptcp: netlink: store per namespace list of refcounted listen socks Kishen Maloor
2022-02-03 17:46   ` Florian Westphal [this message]
2022-02-03 20:09     ` Kishen Maloor
2022-02-03 20:35       ` Florian Westphal
2022-02-04  1:02     ` Mat Martineau
2022-02-04  9:47       ` Paolo Abeni
2022-02-03  7:25 ` [PATCH mptcp-next v5 6/8] mptcp: netlink: store lsk ref in mptcp_pm_addr_entry Kishen Maloor
2022-02-16  3:56   ` Geliang Tang
2022-02-03  7:25 ` [PATCH mptcp-next v5 7/8] mptcp: attempt to add listening sockets for announced addrs Kishen Maloor
2022-02-04 13:52   ` Geliang Tang
2022-02-03  7:25 ` [PATCH mptcp-next v5 8/8] mptcp: expose server_side attribute in MPTCP netlink events Kishen Maloor
2022-02-03  7:38   ` mptcp: expose server_side attribute in MPTCP netlink events: Build Failure MPTCP CI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203174637.GC4901@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=kishen.maloor@intel.com \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.