From: Roi Dayan Date: Tue, 3 Jul 2018 12:54:32 +0000 (+0300) Subject: tc: Fix output of ip attributes X-Git-Tag: v4.18.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=425dcc2741fa65d338f24de0606eb5c724658455;p=thirdparty%2Fiproute2.git tc: Fix output of ip attributes 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 Signed-off-by: Stephen Hemminger --- diff --git a/tc/f_flower.c b/tc/f_flower.c index c71076517..1dfd57d28 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -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); }