From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliang.tang@suse.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH RESEND iproute2-next 1/3] mptcp: add id check for deleting address
Date: Fri, 7 Jan 2022 16:18:18 -0800 (PST) [thread overview]
Message-ID: <90bfcc8a-a6bf-7933-a18-1fe3f795b95d@linux.intel.com> (raw)
In-Reply-To: <e45ed5bcca8c7d1692562cb20c88185fb7e331ca.1641289518.git.geliang.tang@suse.com>
On Tue, 4 Jan 2022, Geliang Tang wrote:
> This patch added the id check for deleting address in mptcp_parse_opt().
> The ADDRESS argument is invalid for the non-zero id address, only needed
> for the id 0 address.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/171
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> ip/ipmptcp.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
> index fd042da8..c2691ef4 100644
> --- a/ip/ipmptcp.c
> +++ b/ip/ipmptcp.c
> @@ -18,7 +18,7 @@ static void usage(void)
> fprintf(stderr,
> "Usage: ip mptcp endpoint add ADDRESS [ dev NAME ] [ id ID ]\n"
> " [ port NR ] [ FLAG-LIST ]\n"
> - " ip mptcp endpoint delete id ID\n"
> + " ip mptcp endpoint delete id ID [ ADDRESS ]\n"
Please also update man/man8/ip-mptcp.8 for the optional ADDRESS parameter.
> " ip mptcp endpoint show [ id ID ]\n"
> " ip mptcp endpoint flush\n"
> " ip mptcp limits set [ subflows NR ] [ add_addr_accepted NR ]\n"
> @@ -142,6 +142,12 @@ static int mptcp_parse_opt(int argc, char **argv, struct nlmsghdr *n,
>
> if (!id_set && !adding)
> missarg("ID");
> + else if (id_set && !adding) {
I think it would be good to move the 'deling' changes (and the change to
the last parameter of mptcp_parse_opt()) from patch 3 to this patch.
> + if (id && addr_set)
> + invarg("invalid for non-zero id address\n", "ADDRESS");
> + else if (!id && !addr_set)
> + invarg("address is needed for deleting id 0 address\n", "ID");
> + }
>
> if (port && !(flags & MPTCP_PM_ADDR_FLAG_SIGNAL))
> invarg("flags must have signal when using port", "port");
> --
> 2.31.1
--
Mat Martineau
Intel
next prev parent reply other threads:[~2022-01-08 0:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 9:58 [PATCH iproute2-next 0/3] more patches from pm_nl_ctl Geliang Tang
2022-01-04 9:58 ` [PATCH RESEND iproute2-next 1/3] mptcp: add id check for deleting address Geliang Tang
2022-01-08 0:18 ` Mat Martineau [this message]
2022-01-04 9:58 ` [PATCH iproute2-next 2/3] mptcp: add the addr flag fullmesh Geliang Tang
2022-01-04 9:58 ` [PATCH iproute2-next 3/3] mptcp: add the backup flag setting Geliang Tang
2022-01-08 0:36 ` Mat Martineau
2022-01-08 0:11 ` [PATCH iproute2-next 0/3] more patches from pm_nl_ctl Mat Martineau
2022-01-10 6:46 ` Geliang Tang
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=90bfcc8a-a6bf-7933-a18-1fe3f795b95d@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliang.tang@suse.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.