[PKT_SCHED]: HTB: Drop packet when direct queue is full
[linux-2.6.git] / net / sched / sch_htb.c
index a85935e7d53d2852ed126f8f1045c798176ad0d0..558cc087e6023f687b616494a12768f6bebf7171 100644 (file)
@@ -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) {