From: Stephen Hemminger Date: Sun, 23 Nov 2025 16:49:49 +0000 (-0800) Subject: tuntap: add missing brackets to json output X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fiproute2.git 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") Signed-off-by: Stephen Hemminger --- 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", ""); @@ -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);