From: Adam Vyskovsky <adamvyskovsky@gmail.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, Adam Vyskovsky <adamvyskovsky@gmail.com>
Subject: [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions
Date: Sun, 18 Feb 2018 20:50:10 +0100 [thread overview]
Message-ID: <20180218195010.6902-1-adamvyskovsky@gmail.com> (raw)
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
next reply other threads:[~2018-02-18 19:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 19:50 Adam Vyskovsky [this message]
2018-02-23 16:16 ` [PATCH iproute2-next] tc: fix an off-by-one error while printing tc actions Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180218195010.6902-1-adamvyskovsky@gmail.com \
--to=adamvyskovsky@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).