diff options
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 d92bce0ea24e..179b51e6bda3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2525,8 +2525,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
2525 | if (!tp->retrans_stamp) | 2525 | if (!tp->retrans_stamp) |
2526 | tp->retrans_stamp = TCP_SKB_CB(skb)->when; | 2526 | tp->retrans_stamp = TCP_SKB_CB(skb)->when; |
2527 | 2527 | ||
2528 | tp->undo_retrans += tcp_skb_pcount(skb); | ||
2529 | |||
2530 | /* snd_nxt is stored to detect loss of retransmitted segment, | 2528 | /* snd_nxt is stored to detect loss of retransmitted segment, |
2531 | * see tcp_input.c tcp_sacktag_write_queue(). | 2529 | * see tcp_input.c tcp_sacktag_write_queue(). |
2532 | */ | 2530 | */ |
@@ -2534,6 +2532,10 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
2534 | } else if (err != -EBUSY) { | 2532 | } else if (err != -EBUSY) { |
2535 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL); | 2533 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL); |
2536 | } | 2534 | } |
2535 | |||
2536 | if (tp->undo_retrans < 0) | ||
2537 | tp->undo_retrans = 0; | ||
2538 | tp->undo_retrans += tcp_skb_pcount(skb); | ||
2537 | return err; | 2539 | return err; |
2538 | } | 2540 | } |
2539 | 2541 | ||