]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: Fix output of ip attributes
authorRoi Dayan <roid@mellanox.com>
Tue, 3 Jul 2018 12:54:32 +0000 (15:54 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Sat, 7 Jul 2018 16:57:45 +0000 (09:57 -0700)
Example output is of tos and ttl.
Befoe this fix the format used %x caused output of the pointer
instead of the intended string created in the out variable.

Fixes: e28b88a464c4 ("tc: jsonify flower filter")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/f_flower.c

index c710765179fb08ac94e04ec664fac0d30cf04931..1dfd57d286d9c9d61e4a8f04b2bd08e0aca605a1 100644 (file)
@@ -1134,7 +1134,7 @@ static void flower_print_ip_attr(char *name, struct rtattr *key_attr,
        if (mask_attr)
                sprintf(out + done, "/%x", rta_getattr_u8(mask_attr));
 
-       sprintf(namefrm, "\n  %s %%x", name);
+       sprintf(namefrm, "\n  %s %%s", name);
        print_string(PRINT_ANY, name, namefrm, out);
 }