Commit 3c4f5456 authored by Li Wei's avatar Li Wei Committed by Stephen Hemminger

tc: prio: Perform more strict check on priomap.

Since band number counts from zero thus band must be little than
opt.bands.
parent 8c8a9089
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment