mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: loopback: clear skb->tstamp before netif_rx()
[ Upstream commit4c16128b62] At least UDP / TCP stacks can now cook skbs with a tstamp using MONOTONIC base (or arbitrary values with SCM_TXTIME) Since loopback driver does not call (directly or indirectly) skb_scrub_packet(), we need to clear skb->tstamp so that net_timestamp_check() can eventually resample the time, using ktime_get_real(). Fixes:80b14dee2b("net: Add a new socket option for a future transmit time.") Fixes:fb420d5d91("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willem de Bruijn <willemb@google.com> Cc: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cf5819b288
commit
3fdf483bcf
@@ -75,6 +75,10 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
|
||||
int len;
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
/* do not fool net_timestamp_check() with various clock bases */
|
||||
skb->tstamp = 0;
|
||||
|
||||
skb_orphan(skb);
|
||||
|
||||
/* Before queueing this packet to netif_rx(),
|
||||
|
||||
Reference in New Issue
Block a user