mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-05 20:48:07 +00:00
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 <adamvyskovsky@gmail.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
7bdd623948
commit
2fb854d07c
@ -368,7 +368,7 @@ tc_print_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts)
|
|||||||
return tc_print_action_flush(f, tb[0]);
|
return tc_print_action_flush(f, tb[0]);
|
||||||
|
|
||||||
open_json_array(PRINT_JSON, "actions");
|
open_json_array(PRINT_JSON, "actions");
|
||||||
for (i = 0; i < tot_acts; i++) {
|
for (i = 0; i <= tot_acts; i++) {
|
||||||
if (tb[i]) {
|
if (tb[i]) {
|
||||||
open_json_object(NULL);
|
open_json_object(NULL);
|
||||||
print_uint(PRINT_ANY, "order",
|
print_uint(PRINT_ANY, "order",
|
||||||
|
Loading…
Reference in New Issue
Block a user