From: Geliang Tang <geliang@kernel.org>
To: Christoph Paasch <cpaasch@openai.com>
Cc: mptcp@lists.linux.dev, Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v2 2/2] mptcp: setsockopt support for TCP_MD5SIG
Date: Fri, 01 Aug 2025 11:01:35 +0800 [thread overview]
Message-ID: <bcf2fe86d9fd4a8c4300db90ec4a8af32b074bdd.camel@kernel.org> (raw)
In-Reply-To: <CADg4-L8S1bqK6f6YUWuoEJOziYL-Q0DZY5p2DFStKA4mFi02mg@mail.gmail.com>
Hi Christoph,
On Thu, 2025-07-31 at 12:18 -0700, Christoph Paasch wrote:
> On Thu, Jul 31, 2025 at 12:28 AM Geliang Tang <geliang@kernel.org>
> wrote:
> >
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > This adds setsockopt support for TCP_MD5SIG and TCP_MD5SIG_EXT
> > options.
> > The implementation:
> > - Allows setting these options (getsockopt remains unsupported)
> > - Applies them only to the first subflow
> > - Forces fallback to TCP (since MD5 isn't compatible with MPTCP)
> >
> > Setting these options triggers fallback to TCP to maintain MD5
> > compatibility.
> >
> > Note that TCP_MD5SIG and TCP_MD5SIG_EXT are unsupported for TCP
> > too.
>
> Just wondering : What does the above line mean ? "unsupported for TCP
> too" ?
It should be:
TCP_MD5SIG and TCP_MD5SIG_EXT getsockopts are unsupported for TCP too.
Thanks,
-Geliang
>
>
> Christoph
>
> >
> > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/575
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> > net/mptcp/sockopt.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
> > index b264185b810d..3ffdeca694be 100644
> > --- a/net/mptcp/sockopt.c
> > +++ b/net/mptcp/sockopt.c
> > @@ -13,6 +13,7 @@
> > #include <net/tcp.h>
> > #include <net/mptcp.h>
> > #include "protocol.h"
> > +#include "mib.h"
> >
> > #define MIN_INFO_OPTLEN_SIZE 16
> > #define MIN_FULL_INFO_OPTLEN_SIZE 40
> > @@ -567,11 +568,12 @@ static bool mptcp_supported_sockopt(int
> > level, int optname)
> > case TCP_FASTOPEN_CONNECT:
> > case TCP_FASTOPEN_KEY:
> > case TCP_FASTOPEN_NO_COOKIE:
> > + /* MD5 will force a fallback to TCP: OK to set
> > while not connected */
> > + case TCP_MD5SIG:
> > + case TCP_MD5SIG_EXT:
> > return true;
> > }
> >
> > - /* TCP_MD5SIG, TCP_MD5SIG_EXT are not supported,
> > MD5 is not compatible with MPTCP */
> > -
> > /* TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ,
> > TCP_REPAIR_OPTIONS,
> > * TCP_REPAIR_WINDOW are not supported, better
> > avoid this mess
> > */
> > @@ -830,6 +832,12 @@ static int mptcp_setsockopt_sol_tcp(struct
> > mptcp_sock *msk, int optname,
> > /* See tcp.c: TCP_DEFER_ACCEPT does not fail */
> > mptcp_setsockopt_first_sf_only(msk, SOL_TCP,
> > optname, optval, optlen);
> > return 0;
> > +#ifdef CONFIG_TCP_MD5SIG
> > + case TCP_MD5SIG:
> > + case TCP_MD5SIG_EXT:
> > + __mptcp_try_fallback(msk,
> > MPTCP_MIB_MD5SIGFALLBACK);
> > + fallthrough;
> > +#endif
> > case TCP_FASTOPEN:
> > case TCP_FASTOPEN_CONNECT:
> > case TCP_FASTOPEN_KEY:
> > --
> > 2.48.1
> >
> >
next prev parent reply other threads:[~2025-08-01 3:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 7:27 [PATCH mptcp-next v2 0/2] mptcp: TCP_MD5SIG support Geliang Tang
2025-07-31 7:27 ` [PATCH mptcp-next v2 1/2] mptcp: Handle TCP_MAXSEG getsockopt in common case Geliang Tang
2025-07-31 7:27 ` [PATCH mptcp-next v2 2/2] mptcp: setsockopt support for TCP_MD5SIG Geliang Tang
2025-07-31 9:59 ` Matthieu Baerts
2025-08-01 3:00 ` Geliang Tang
2025-07-31 19:18 ` Christoph Paasch
2025-08-01 3:01 ` Geliang Tang [this message]
2025-07-31 9:23 ` [PATCH mptcp-next v2 0/2] mptcp: TCP_MD5SIG support 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=bcf2fe86d9fd4a8c4300db90ec4a8af32b074bdd.camel@kernel.org \
--to=geliang@kernel.org \
--cc=cpaasch@openai.com \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@kylinos.cn \
/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.