]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: put size table options in json object
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 25 Nov 2022 18:48:02 +0000 (10:48 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 25 Nov 2022 18:48:02 +0000 (10:48 -0800)
Missed this part from earlier change.

Fixes: 6af6f02cce42 ("tc: add json support to size table")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/tc_stab.c

index 06dc1b134d850e54fae98f5d8c1584179ad6af4a..0f944003458d4db76efaefb0e3f543d4fb8c9492 100644 (file)
@@ -117,6 +117,7 @@ void print_size_table(struct rtattr *rta)
                memcpy(&s, RTA_DATA(tb[TCA_STAB_BASE]),
                                MIN(RTA_PAYLOAD(tb[TCA_STAB_BASE]), sizeof(s)));
 
+               open_json_object("stab");
                print_string(PRINT_FP, NULL, " ", NULL);
 
                if (s.linklayer)
@@ -135,5 +136,6 @@ void print_size_table(struct rtattr *rta)
                if (s.tsize)
                        print_uint(PRINT_ANY, "tsize",
                                   "tsize %u ", s.tsize);
+               close_json_object();
        }
 }