diff options
author | Geliang Tang <geliang.tang@suse.com> | 2022-02-02 17:03:42 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-03 11:44:08 +0000 |
commit | c25d29be00c1a1c53549b71d06a1fb666b598d3b (patch) | |
tree | 1d12eba91be2e9f620e8dabbf336e3ed9c3fe0a1 /tools/testing | |
parent | 73c762c1f07dacba4fd1cefd15e24b419d42320d (diff) |
selftests: mptcp: set fullmesh flag in pm_nl_ctl
This patch added the fullmesh flag setting and clearing support in
pm_nl_ctl:
# pm_nl_ctl set ip flags fullmesh
# pm_nl_ctl set ip flags nofullmesh
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c index 354784512748..152b84e44d69 100644 --- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c +++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c @@ -28,7 +28,7 @@ static void syntax(char *argv[]) fprintf(stderr, "\tadd [flags signal|subflow|backup|fullmesh] [id <nr>] [dev <name>] <ip>\n"); fprintf(stderr, "\tdel <id> [<ip>]\n"); fprintf(stderr, "\tget <id>\n"); - fprintf(stderr, "\tset <ip> [flags backup|nobackup]\n"); + fprintf(stderr, "\tset <ip> [flags backup|nobackup|fullmesh|nofullmesh]\n"); fprintf(stderr, "\tflush\n"); fprintf(stderr, "\tdump\n"); fprintf(stderr, "\tlimits [<rcv addr max> <subflow max>]\n"); @@ -704,12 +704,14 @@ int set_flags(int fd, int pm_family, int argc, char *argv[]) if (++arg >= argc) error(1, 0, " missing flags value"); - /* do not support flag list yet */ for (str = argv[arg]; (tok = strtok(str, ",")); str = NULL) { if (!strcmp(tok, "backup")) flags |= MPTCP_PM_ADDR_FLAG_BACKUP; - else if (strcmp(tok, "nobackup")) + else if (!strcmp(tok, "fullmesh")) + flags |= MPTCP_PM_ADDR_FLAG_FULLMESH; + else if (strcmp(tok, "nobackup") && + strcmp(tok, "nofullmesh")) error(1, errno, "unknown flag %s", argv[arg]); } |