Skip to content

Commit c47d8c2

Browse files
Jesus Sanchez-Palenciadavem330
authored andcommitted
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 <jesus.sanchez-palencia@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d287c50 commit c47d8c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/skbuff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce);
48984898
*/
48994899
void skb_scrub_packet(struct sk_buff *skb, bool xnet)
49004900
{
4901-
skb->tstamp = 0;
49024901
skb->pkt_type = PACKET_HOST;
49034902
skb->skb_iif = 0;
49044903
skb->ignore_df = 0;
@@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
49124911

49134912
ipvs_reset(skb);
49144913
skb->mark = 0;
4914+
skb->tstamp = 0;
49154915
}
49164916
EXPORT_SYMBOL_GPL(skb_scrub_packet);
49174917

0 commit comments

Comments
 (0)