lkml.org 
[lkml]   [2016]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.2.y-ckt 33/53] tcp: refresh skb timestamp at retransmit time
    Date
    4.2.8-ckt11 -stable review patch.  If anyone has any objections, please let me know.

    ---8<------------------------------------------------------------

    From: Eric Dumazet <edumazet@google.com>

    commit 10a81980fc47e64ffac26a073139813d3f697b64 upstream.

    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: Kamal Mostafa <kamal@canonical.com>
    ---
    net/ipv4/tcp_output.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
    index 71bbadd..56394dc 100644
    --- a/net/ipv4/tcp_output.c
    +++ b/net/ipv4/tcp_output.c
    @@ -2630,8 +2630,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 {
    --
    2.7.4
    \
     
     \ /
      Last update: 2016-05-24 20:21    [W:4.074 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site