提交 c47d8c2f 编写于 作者: J Jesus Sanchez-Palencia 提交者: David S. Miller

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: NJesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d287c502
...@@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce); ...@@ -4898,7 +4898,6 @@ EXPORT_SYMBOL(skb_try_coalesce);
*/ */
void skb_scrub_packet(struct sk_buff *skb, bool xnet) void skb_scrub_packet(struct sk_buff *skb, bool xnet)
{ {
skb->tstamp = 0;
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
skb->skb_iif = 0; skb->skb_iif = 0;
skb->ignore_df = 0; skb->ignore_df = 0;
...@@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) ...@@ -4912,6 +4911,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
ipvs_reset(skb); ipvs_reset(skb);
skb->mark = 0; skb->mark = 0;
skb->tstamp = 0;
} }
EXPORT_SYMBOL_GPL(skb_scrub_packet); EXPORT_SYMBOL_GPL(skb_scrub_packet);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册