netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] tuntap: add missing brackets to json output
@ 2025-11-23 16:53 Stephen Hemminger
  2025-11-25  0:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2025-11-23 16:53 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, Zhengyi Fu

The set of processes attached to tuntap are displayed
as JSON array, but was missing the inner brackets to
allow for multiple processes.

Fixes: 689bef5dc97a ("tuntap: support JSON output")
Reported-by: Zhengyi Fu <i@fuzy.me>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/iptuntap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ip/iptuntap.c b/ip/iptuntap.c
index b7018a6f..6718ec6c 100644
--- a/ip/iptuntap.c
+++ b/ip/iptuntap.c
@@ -314,6 +314,7 @@ static void show_processes(const char *name)
 				   !strcmp(name, value)) {
 				SPRINT_BUF(pname);
 
+				open_json_object(NULL);
 				if (get_task_name(pid, pname, sizeof(pname)))
 					print_string(PRINT_ANY, "name",
 						     "%s", "<NULL>");
@@ -322,6 +323,7 @@ static void show_processes(const char *name)
 						     "%s", pname);
 
 				print_uint(PRINT_ANY, "pid", "(%d)", pid);
+				close_json_object();
 			}
 
 			free(key);
-- 
2.51.0


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

* Re: [PATCH iproute2] tuntap: add missing brackets to json output
  2025-11-23 16:53 [PATCH iproute2] tuntap: add missing brackets to json output Stephen Hemminger
@ 2025-11-25  0:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-25  0:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, i

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Sun, 23 Nov 2025 08:53:06 -0800 you wrote:
> The set of processes attached to tuntap are displayed
> as JSON array, but was missing the inner brackets to
> allow for multiple processes.
> 
> Fixes: 689bef5dc97a ("tuntap: support JSON output")
> Reported-by: Zhengyi Fu <i@fuzy.me>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> [...]

Here is the summary with links:
  - [iproute2] tuntap: add missing brackets to json output
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=9cc782b36abe

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-11-25  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-23 16:53 [PATCH iproute2] tuntap: add missing brackets to json output Stephen Hemminger
2025-11-25  0:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).