diff options
author | Eric Dumazet <edumazet@google.com> | 2014-03-05 14:08:38 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-07 14:32:57 -0500 |
commit | 219626924222b6b41bf2264896b34a6abaaeecf0 (patch) | |
tree | da1dc3b24f282e705f32e317908afae415e506fc /net/ipv4 | |
parent | 28f084cca35a73698568d8c060bbb98193021db5 (diff) | |
download | op-kernel-dev-219626924222b6b41bf2264896b34a6abaaeecf0.zip op-kernel-dev-219626924222b6b41bf2264896b34a6abaaeecf0.tar.gz |
tcp: do not leak non zero tstamp in output packets
Usage of skb->tstamp should remain private to TCP stack
(only set on packets on write queue, not on cloned ones)
Otherwise, packets given to loopback interface with a non null tstamp
can confuse netif_rx() / net_timestamp_check()
Other possibility would be to clear tstamp in loopback_xmit(),
as done in skb_scrub_packet()
Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a02c884..bc0fb0f 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -882,6 +882,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, skb = skb_clone(skb, gfp_mask); if (unlikely(!skb)) return -ENOBUFS; + /* Our usage of tstamp should remain private */ + skb->tstamp.tv64 = 0; } inet = inet_sk(sk); |