From: Stephen Hemminger <shemminger@vyatta.com>
To: Li Wei <lw@cn.fujitsu.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] tc: prio: Perform more strict check on priomap.
Date: Mon, 18 Jun 2012 12:25:54 -0700 [thread overview]
Message-ID: <20120618122554.403f53ec@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <4FDECBC2.1090304@cn.fujitsu.com>
On Mon, 18 Jun 2012 14:33:38 +0800
Li Wei <lw@cn.fujitsu.com> wrote:
>
> 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;
> }
Applied
prev parent reply other threads:[~2012-06-18 19:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 6:33 [PATCH] tc: prio: Perform more strict check on priomap Li Wei
2012-06-18 19:25 ` Stephen Hemminger [this message]
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=20120618122554.403f53ec@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=lw@cn.fujitsu.com \
--cc=netdev@vger.kernel.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).