From: Geliang Tang <geliang.tang@suse.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] mptcp: add fullmesh flag check for adding address
Date: Thu, 24 Feb 2022 07:51:46 +0800 [thread overview]
Message-ID: <20220223235146.GA4231@bogon> (raw)
In-Reply-To: <7cba6dc-53a-29a5-a684-6f47a39cf568@linux.intel.com>
On Tue, Feb 22, 2022 at 04:52:40PM -0800, Mat Martineau wrote:
> On Mon, 21 Feb 2022, Geliang Tang wrote:
>
> > The fullmesh flag mustn't be used with the signal flag when adding an
> > address. This patch added the necessary flags check for this case.
> >
>
> Hi Geliang -
>
> What happens if FULLMESH and SIGNAL are used together with the existing
> code? Is this a patch that should go to -net with a Fixes: tag?
Hi Mat,
If 'fullmesh' is used with 'signal', 'fullmesh' will not take effect.
Since there's no address signal mechanism to send the fullmesh flag to
the peer. We only deal the fullmesh flag with local addresses.
Thanks,
-Geliang
>
> -Mat
>
>
> > Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> > ---
> > net/mptcp/pm_netlink.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> > index a0e7d5b7e22f..e3b0384ff79a 100644
> > --- a/net/mptcp/pm_netlink.c
> > +++ b/net/mptcp/pm_netlink.c
> > @@ -1253,6 +1253,12 @@ static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info)
> > return -EINVAL;
> > }
> >
> > + if (addr.flags & MPTCP_PM_ADDR_FLAG_SIGNAL &&
> > + addr.flags & MPTCP_PM_ADDR_FLAG_FULLMESH) {
> > + GENL_SET_ERR_MSG(info, "flags mustn't have both signal and fullmesh");
> > + return -EINVAL;
> > + }
> > +
> > if (addr.flags & MPTCP_PM_ADDR_FLAG_IMPLICIT) {
> > GENL_SET_ERR_MSG(info, "can't create IMPLICIT endpoint");
> > return -EINVAL;
> > --
> > 2.34.1
> >
> >
> >
>
> --
> Mat Martineau
> Intel
>
next prev parent reply other threads:[~2022-02-23 23:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 4:51 [PATCH mptcp-next] mptcp: add fullmesh flag check for adding address Geliang Tang
2022-02-23 0:52 ` Mat Martineau
2022-02-23 1:01 ` Mat Martineau
2022-02-23 23:51 ` Geliang Tang [this message]
2022-02-23 21:06 ` Matthieu Baerts
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=20220223235146.GA4231@bogon \
--to=geliang.tang@suse.com \
--cc=mathew.j.martineau@linux.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.