[PATCH] NET_SCHED: prio qdisc boundary condition

This fixes an out-of-boundary condition when the classified
band equals q->bands. Caught by Alexey

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
This commit is contained in:
Jamal Hadi Salim
2007-05-15 01:23:46 -07:00
committed by Chris Wright
parent 5074ff3b1b
commit 7b890c17f7
+1 -1
View File
@@ -74,7 +74,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
band = res.classid;
}
band = TC_H_MIN(band) - 1;
if (band > q->bands)
if (band >= q->bands)
return q->queues[q->prio2band[0]];
return q->queues[band];