- patches.apparmor/remove_suid_new_case_in_2.6.22.diff: Merge fix.
[linux-flexiantxendom0-3.2.10.git] / net / sched / sch_teql.c
index 587123c..f05ad9a 100644 (file)
@@ -94,14 +94,13 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
        struct net_device *dev = sch->dev;
        struct teql_sched_data *q = qdisc_priv(sch);
 
-       __skb_queue_tail(&q->q, skb);
-       if (q->q.qlen <= dev->tx_queue_len) {
+       if (q->q.qlen < dev->tx_queue_len) {
+               __skb_queue_tail(&q->q, skb);
                sch->bstats.bytes += skb->len;
                sch->bstats.packets++;
                return 0;
        }
 
-       __skb_unlink(skb, &q->q);
        kfree_skb(skb);
        sch->qstats.drops++;
        return NET_XMIT_DROP;
@@ -323,7 +322,7 @@ restart:
                        nores = 1;
                        break;
                }
-               __skb_pull(skb, skb->nh.raw - skb->data);
+               __skb_pull(skb, skb_network_offset(skb));
        } while ((q = NEXT_SLAVE(q)) != start);
 
        if (nores && skb_res == NULL) {