]> git.itanic.dy.fi Git - linux-stable/commitdiff
[NET_SCHED]: prio qdisc boundary condition
authorJamal Hadi Salim <hadi@cyberus.ca>
Tue, 22 May 2007 23:03:30 +0000 (01:03 +0200)
committerAdrian Bunk <bunk@stusta.de>
Tue, 22 May 2007 23:03:30 +0000 (01:03 +0200)
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>
net/sched/sch_prio.c

index 337a050895aceec5e36978caac7264259879801f..af007fd627d1475ae3abb0a32c8b9dac88b7f23b 100644 (file)
@@ -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];