* [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions
@ 2018-02-18 19:50 Adam Vyskovsky
2018-02-23 16:16 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Adam Vyskovsky @ 2018-02-18 19:50 UTC (permalink / raw)
To: stephen; +Cc: netdev, Adam Vyskovsky
The tc_print_action() function did not print all tc actions
when e.g. TCA_ACT_MAX_PRIO actions were defined for a single
tc filter.
Signed-off-by: Adam Vyskovsky <adamvyskovsky@gmail.com>
---
tc/m_action.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_action.c b/tc/m_action.c
index 744bde41..6c3049c7 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -365,7 +365,7 @@ tc_print_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts)
return tc_print_action_flush(f, tb[0]);
open_json_array(PRINT_JSON, "actions");
- for (i = 0; i < tot_acts; i++) {
+ for (i = 0; i <= tot_acts; i++) {
if (tb[i]) {
open_json_object(NULL);
print_uint(PRINT_ANY, "order",
--
2.16.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions
2018-02-18 19:50 [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions Adam Vyskovsky
@ 2018-02-23 16:16 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-02-23 16:16 UTC (permalink / raw)
To: Adam Vyskovsky; +Cc: netdev
On Sun, 18 Feb 2018 20:50:10 +0100
Adam Vyskovsky <adamvyskovsky@gmail.com> wrote:
> The tc_print_action() function did not print all tc actions
> when e.g. TCA_ACT_MAX_PRIO actions were defined for a single
> tc filter.
>
> Signed-off-by: Adam Vyskovsky <adamvyskovsky@gmail.com>
Applied to master branch since it is a bug fix.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-23 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-18 19:50 [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions Adam Vyskovsky
2018-02-23 16:16 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).