diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2007-05-15 01:23:46 -0700 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-05-23 14:32:51 -0700 |
commit | 7b890c17f74b976f82e38b84d29724212fccb91a (patch) | |
tree | 5f6cf69af7041cf8c923cae284f498ab557b1003 | |
parent | 5074ff3b1b62430d2b363c81a83226c74598d730 (diff) |
[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>
-rw-r--r-- | net/sched/sch_prio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index de889f23f22a..a86f36b07375 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -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]; |