mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
tcp: refresh skb timestamp at retransmit time
[ Upstream commit10a81980fc] 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:7faee5c0d5("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a7ddb04779
commit
2cddc95adf
@@ -2625,8 +2625,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 {
|
||||
|
||||
Reference in New Issue
Block a user