diff options
author | Eric Dumazet <edumazet@google.com> | 2016-05-09 20:55:16 -0700 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-12 08:48:16 -0400 |
commit | d0cc41a3796ecb0211ea8b61bc2e4ad5a3234520 (patch) | |
tree | d3b031ea90f46454dc058294c6a121539c90e946 /net/ipv4/tcp_output.c | |
parent | b35237a8295196b3ea3efb36fde887b7b4dffb9a (diff) | |
download | linux-stable-d0cc41a3796ecb0211ea8b61bc2e4ad5a3234520.tar.gz linux-stable-d0cc41a3796ecb0211ea8b61bc2e4ad5a3234520.tar.bz2 linux-stable-d0cc41a3796ecb0211ea8b61bc2e4ad5a3234520.zip |
tcp: refresh skb timestamp at retransmit time
[ Upstream commit 10a81980fc47e64ffac26a073139813d3f697b64 ]
In the very unlikely case __tcp_retransmit_skb() can not use the cloning
done in tcp_transmit_skb(), we need to refresh skb_mstamp before doing
the copy and transmit, otherwise TCP TS val will be an exact copy of
original transmit.
Fixes: 7faee5c0d514 ("tcp: remove TCP_SKB_CB(skb)->when")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 9c7d88870e2b..af2f64eeb98f 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2532,8 +2532,10 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) */ if (unlikely((NET_IP_ALIGN && ((unsigned long)skb->data & 3)) || skb_headroom(skb) >= 0xFFFF)) { - struct sk_buff *nskb = __pskb_copy(skb, MAX_TCP_HEADER, - GFP_ATOMIC); + struct sk_buff *nskb; + + skb_mstamp_get(&skb->skb_mstamp); + nskb = __pskb_copy(skb, MAX_TCP_HEADER, GFP_ATOMIC); err = nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) : -ENOBUFS; } else { |