mptcp: show all endpoints when no ID is specified

According to 'ip mptcp help', 'endpoint show' can accept no argument:

  ip mptcp endpoint show [ id ID ]

It makes sense to print all endpoints when no filter is used.

So here if the following command is used, all endpoints are printed:

  ip mptcp endpoint show

Same as:

  ip mptcp endpoint

Fixes: 7e0767cd ("add support for mptcp netlink interface")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Matthieu Baerts 2020-07-24 14:17:18 +02:00 committed by Stephen Hemminger
parent 848b1b8e04
commit 3a53ff7e58
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ static int mptcp_addr_show(int argc, char **argv)
struct nlmsghdr *answer;
int ret;
if (!argv)
if (argc <= 0)
return mptcp_addr_dump();
ret = mptcp_parse_opt(argc, argv, &req.n, false);