From: Matthieu Baerts Date: Fri, 24 Jul 2020 12:17:18 +0000 (+0200) Subject: mptcp: show all endpoints when no ID is specified X-Git-Tag: v5.8.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a53ff7e587cd26e7dc5285b0a78716928270554;p=thirdparty%2Fiproute2.git 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 Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c index bc12418bd..e1ffafb3c 100644 --- a/ip/ipmptcp.c +++ b/ip/ipmptcp.c @@ -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);