diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f9800f4059b43f7e74d2741a0d3885c5a9efb787..d1967dab9cc697a4dad45838e1a94c2b5f9cf147 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4124,18 +4124,21 @@ EXPORT_SYMBOL(skb_try_coalesce); */ void skb_scrub_packet(struct sk_buff *skb, bool xnet) { - if (xnet) - skb_orphan(skb); skb->tstamp.tv64 = 0; skb->pkt_type = PACKET_HOST; skb->skb_iif = 0; skb->ignore_df = 0; skb_dst_drop(skb); - skb->mark = 0; skb_sender_cpu_clear(skb); secpath_reset(skb); nf_reset(skb); nf_reset_trace(skb); + + if (!xnet) + return; + + skb_orphan(skb); + skb->mark = 0; } EXPORT_SYMBOL_GPL(skb_scrub_packet);