diff --git a/tc/q_prio.c b/tc/q_prio.c index 79b4fd09..bacc7024 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; }