tc: fix an off-by-one error while printing tc actions
Subsystems (2)
PATCH 1/1 tc: fix an off-by-one error while printing tc actions
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 <[email protected]>
--- tc/m_action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tc/m_action.c +1 -1
@@ -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",
Signature · 1 line
2.16.1
Stephen Hemminger
AppliedQuoted 5 lines · On Sun, 18 Feb 2018 20:50:10 +0100 Adam Vyskovsky <[email protected]>…
The
tc_print_action()function did not print all tc actions when e.g.TCA_ACT_MAX_PRIOactions were defined for a single tc filter.Signed-off-by Adam Vyskovsky <[email protected]>
Applied to master branch since it is a bug fix.