]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip: iplink.c: open/close json obj for ip -brief -json link show dev DEV
authorJulien Fortin <julien@cumulusnetworks.com>
Thu, 17 Aug 2017 17:35:53 +0000 (10:35 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 18 Aug 2017 01:02:40 +0000 (18:02 -0700)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ip/iplink.c

index 5aff2fde38dae1526cdbcd39f68b40dc9c18e555..19bda1b99f55833c6b5feb17ac27e9a5c50a61fe 100644 (file)
@@ -1041,10 +1041,12 @@ int iplink_get(unsigned int flags, char *name, __u32 filt_mask)
        if (rtnl_talk(&rth, &req.n, &answer.n, sizeof(answer)) < 0)
                return -2;
 
+       open_json_object(NULL);
        if (brief)
                print_linkinfo_brief(NULL, &answer.n, stdout, NULL);
        else
                print_linkinfo(NULL, &answer.n, stdout);
+       close_json_object();
 
        return 0;
 }