All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH iproute2] mptcp: show all endpoints when no ID is specified
@ 2020-07-24 12:17 ` Matthieu Baerts
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2020-07-24 12:17 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

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(a)tessares.net>
---
 ip/ipmptcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index bc12418b..e1ffafb3 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);
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH iproute2] mptcp: show all endpoints when no ID is specified
@ 2020-07-24 12:17 ` Matthieu Baerts
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2020-07-24 12:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, mptcp, Matthieu Baerts

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>
---
 ip/ipmptcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index bc12418b..e1ffafb3 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);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [MPTCP] Re: [PATCH iproute2] mptcp: show all endpoints when no ID is specified
  2020-07-24 12:17 ` Matthieu Baerts
@ 2020-07-27 23:44 ` Stephen Hemminger
  -1 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2020-07-27 23:44 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On Fri, 24 Jul 2020 14:17:18 +0200
Matthieu Baerts <matthieu.baerts(a)tessares.net> wrote:

> 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(a)tessares.net>

Applied thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute2] mptcp: show all endpoints when no ID is specified
@ 2020-07-27 23:44 ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2020-07-27 23:44 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: netdev, mptcp

On Fri, 24 Jul 2020 14:17:18 +0200
Matthieu Baerts <matthieu.baerts@tessares.net> wrote:

> 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>

Applied thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-27 23:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 12:17 [MPTCP] [PATCH iproute2] mptcp: show all endpoints when no ID is specified Matthieu Baerts
2020-07-24 12:17 ` Matthieu Baerts
2020-07-27 23:44 [MPTCP] " Stephen Hemminger
2020-07-27 23:44 ` Stephen Hemminger

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.