Merge branch 'stmp' into devel
[linux-2.6-block.git] / net / sched / sch_netem.c
index d876b873484852d0a1da004e51fc4198d65627de..2b88295cb7b7133f13e68b5e9e644c2d7fa888ab 100644 (file)
@@ -280,6 +280,14 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
                        if (unlikely(!skb))
                                return NULL;
 
+#ifdef CONFIG_NET_CLS_ACT
+                       /*
+                        * If it's at ingress let's pretend the delay is
+                        * from the network (tstamp will be updated).
+                        */
+                       if (G_TC_FROM(skb->tc_verd) & AT_INGRESS)
+                               skb->tstamp.tv64 = 0;
+#endif
                        pr_debug("netem_dequeue: return skb=%p\n", skb);
                        sch->q.qlen--;
                        return skb;