From: Jesus Sanchez-Palencia Date: Tue, 3 Jul 2018 22:42:47 +0000 (-0700) Subject: net: Clear skb->tstamp only on the forwarding path X-Git-Tag: v4.19~410^2~465^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c47d8c2f38f805ba541496ddd7d8c3aee59b49d5;p=platform%2Fkernel%2Flinux-rpi.git net: Clear skb->tstamp only on the forwarding path This is done in preparation for the upcoming time based transmission patchset. Now that skb->tstamp will be used to hold packet's txtime, we must ensure that it is being cleared when traversing namespaces. Also, doing that from skb_scrub_packet() before the early return would break our feature when tunnels are used. Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1357f36..c4e24ac 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce); */ void skb_scrub_packet(struct sk_buff *skb, bool xnet) { - skb->tstamp = 0; skb->pkt_type = PACKET_HOST; skb->skb_iif = 0; skb->ignore_df = 0; @@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) ipvs_reset(skb); skb->mark = 0; + skb->tstamp = 0; } EXPORT_SYMBOL_GPL(skb_scrub_packet);