* [PATCH iproute2] tc: Fix output of ip attributes
@ 2018-07-03 12:54 Roi Dayan
2018-07-07 17:00 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Roi Dayan @ 2018-07-03 12:54 UTC (permalink / raw)
To: netdev; +Cc: Jiri Pirko, Or Gerlitz, Roi Dayan
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>
---
tc/f_flower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index c710765179fb..1dfd57d286d9 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);
}
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] tc: Fix output of ip attributes
2018-07-03 12:54 [PATCH iproute2] tc: Fix output of ip attributes Roi Dayan
@ 2018-07-07 17:00 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-07-07 17:00 UTC (permalink / raw)
To: Roi Dayan; +Cc: netdev, Jiri Pirko, Or Gerlitz
On Tue, 3 Jul 2018 15:54:32 +0300
Roi Dayan <roid@mellanox.com> wrote:
> 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>
Applied.
It would be better to use snprintf to be safe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-07 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-03 12:54 [PATCH iproute2] tc: Fix output of ip attributes Roi Dayan
2018-07-07 17:00 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.