Преглед изворни кода

[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>
Jamal Hadi Salim пре 18 година
родитељ
комит
3e5c2d3bdb
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      net/sched/sch_prio.c

+ 1 - 1
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];