Skip to content

Commit

Permalink
[PKT_SCHED]: HTB: Drop packet when direct queue is full
Browse files Browse the repository at this point in the history
htb_enqueue(): Free skb and return NET_XMIT_DROP if a packet is
destined for the direct_queue but the direct_queue is full. (Before
this: erroneously returned NET_XMIT_SUCCESS even though the packet was
not enqueued)

Signed-off-by: Asim Shankar <asimshankar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
asimshankar authored and davem330 committed May 3, 2005
1 parent 96edf83 commit 033d899
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (q->direct_queue.qlen < q->direct_qlen) {
__skb_queue_tail(&q->direct_queue, skb);
q->direct_pkts++;
} else {
kfree_skb(skb);
sch->qstats.drops++;
return NET_XMIT_DROP;
}
#ifdef CONFIG_NET_CLS_ACT
} else if (!cl) {
Expand Down

0 comments on commit 033d899

Please sign in to comment.