summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2007-05-23 01:03:30 +0200
committerAdrian Bunk <bunk@stusta.de>2007-05-23 01:03:30 +0200
commit2900960ba205f09ce3bfe2fd168dce048b061b25 (patch)
tree08145abb3767cef30c4c6e17bb8cbf41c81e02c0
parent9bf4eae1b5a9787d5321478e6bac6e66c37b4d3e (diff)
downloadlwn-2900960ba205f09ce3bfe2fd168dce048b061b25.tar.gz
lwn-2900960ba205f09ce3bfe2fd168dce048b061b25.zip
[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: Adrian Bunk <bunk@stusta.de>
-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 337a050895ac..af007fd627d1 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -76,7 +76,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];