From: Li Wei <lw@cn.fujitsu.com>
To: netdev <netdev@vger.kernel.org>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Subject: [PATCH] tc: prio: Perform more strict check on priomap.
Date: Mon, 18 Jun 2012 14:33:38 +0800 [thread overview]
Message-ID: <4FDECBC2.1090304@cn.fujitsu.com> (raw)
Since band number counts from zero thus band must be little than
opt.bands.
---
tc/q_prio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tc/q_prio.c b/tc/q_prio.c
index 79b4fd0..bacc702 100644
--- a/tc/q_prio.c
+++ b/tc/q_prio.c
@@ -67,7 +67,7 @@ static int prio_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
fprintf(stderr, "Illegal \"priomap\" element\n");
return -1;
}
- if (band > opt.bands) {
+ if (band >= opt.bands) {
fprintf(stderr, "\"priomap\" element is out of bands\n");
return -1;
}
--
1.7.1
next reply other threads:[~2012-06-18 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 6:33 Li Wei [this message]
2012-06-18 19:25 ` [PATCH] tc: prio: Perform more strict check on priomap 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=4FDECBC2.1090304@cn.fujitsu.com \
--to=lw@cn.fujitsu.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).