Hi,
* Asim Shankar <7bca1cb50504211221655fd54c@xxxxxxxxxxxxxx> 2005-04-21 14:21
> Specifically, in the lines:
> if (cl == HTB_DIRECT) {
> /* enqueue to helper queue */
> if (q->direct_queue.qlen < q->direct_qlen) {
> __skb_queue_tail(&q->direct_queue, skb);
> q->direct_pkts++;
> }
> }
>
> If a packet is classified as HTB_DIRECT but the direct_queue is
> already full, then the packet doesn't get enqueued but sch->q.qlen++
> will happen a few lines later. Overflowing of the direct_queue
> probably rarely happens in practice, but I was playing around and
> noticed it happen in some corner cases of my testing.
Yes, that's a bug.
> Should the packet be dropped instead? Like:
>
> if (cl == HTB_DIRECT) {
> /* enqueue to helper queue */
> if (q->direct_queue.qlen < q->direct_qlen) {
> __skb_queue_tail(&q->direct_queue, skb);
> q->direct_pkts++;
> } else {
> sch->qstats.drops++;
> kfree_skb(skb);
> return NET_XMIT_DROP;
> }
> }
Can you send a patch?
|