Skip to contentSkip to conversation

tuntap: add missing brackets to json output

PATCH Applied Stephen Hemminger 2 participants 2 messages Nov 23, 2025 – Nov 25, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tuntap: add missing brackets to json output

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")
---
 ip/iptuntap.c | 2 ++
 1 file changed, 2 insertions(+)
ip/iptuntap.c +2 -0
index b7018a6f..6718ec6c 100644
@@ -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);
Signature · 1 line
2.51.0
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 9 lines · 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")

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html