aboutsummaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2007-05-14 02:57:19 -0700
committerDavid S. Miller <davem@davemloft.net>2007-05-14 02:57:19 -0700
commit3e5c2d3bdbe2c047b9853c4248f881f5ac645c89 (patch)
treec49dee3d5a8151a21434408cc25913d021aa1f15 /net/sched
parent6253db055eb62a1bd0a18a1d8489565303b2b1dd (diff)
[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>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_prio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 269a6e17c6c..6d7542c26e4 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -75,7 +75,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];