From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] mptcp: ignore unsupported msg flags
Date: Wed, 14 Apr 2021 17:51:51 +0200 [thread overview]
Message-ID: <20210414155151.GG14932@breakpoint.cc> (raw)
In-Reply-To: <fb3746774c97c3042beb7d76cf9f23e57d7f85e1.1618413785.git.pabeni@redhat.com>
Paolo Abeni <pabeni@redhat.com> wrote:
> Currently mptcp_sendmsg()/mptcp_recvmsg() fail with EOPNOTSUPP
> if the user-space provides some unsupported flag. That is
> unexpected and may foul existing applications migrated to MPTCP,
> which expect a different behavior.
>
> Change the mentioned function to silently ignore the unsupported
> flags.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/162
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/protocol.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 2d895c3c8746..bdec946b9b04 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1585,8 +1585,8 @@ static int mptcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
> int ret = 0;
> long timeo;
>
> - if (msg->msg_flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL))
> - return -EOPNOTSUPP;
> + /* ignore unsupported flags */
> + msg->msg_flags &= MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL;
Ignoring MSG_MORE is fine, but DONTWAIT and NOSIGNAL?
I'd prefer hard errors for those until mptcp does the right thing for
them.
next prev parent reply other threads:[~2021-04-14 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 15:23 [PATCH mptcp-next] mptcp: ignore unsupported msg flags Paolo Abeni
2021-04-14 15:51 ` Florian Westphal [this message]
2021-04-14 16:07 ` Paolo Abeni
2021-04-15 8:27 ` Florian Westphal
2021-04-15 9:33 ` Paolo Abeni
2021-04-15 9:44 ` Florian Westphal
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=20210414155151.GG14932@breakpoint.cc \
--to=fw@strlen.de \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
/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.