tc: prio: Perform more strict check on priomap.

Since band number counts from zero thus band must be little than
opt.bands.
This commit is contained in:
Li Wei 2012-06-18 14:33:38 +08:00 committed by Stephen Hemminger
parent 8c8a9089ba
commit 3c4f545633
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}