diff options
| author | Eric Dumazet <[email protected]> | 2018-10-20 02:11:26 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-10-20 08:01:28 +0000 |
| commit | 4c16128b6271e70c8743178e90cccee147858503 (patch) | |
| tree | ae8fad1930523a8807ff9ece83b230ff224628ff | |
| parent | net: ethernet: lpc_eth: add device and device node local variables (diff) | |
| download | kernel-4c16128b6271e70c8743178e90cccee147858503.tar.gz kernel-4c16128b6271e70c8743178e90cccee147858503.zip | |
net: loopback: clear skb->tstamp before netif_rx()
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: 80b14dee2bea ("net: Add a new socket option for a future transmit time.")
Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Willem de Bruijn <[email protected]>
Cc: Soheil Hassas Yeganeh <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
| -rw-r--r-- | drivers/net/loopback.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index a7207fa7e451..2df7f60fe052 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -69,6 +69,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(), |
