Skip to content

Commit

Permalink
tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
Browse files Browse the repository at this point in the history
This commit ensures that lost_cnt_hint is correctly updated in
tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment
in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders
need their own adjustment.

This applies the spirit of 1e5289e -
except now that the sequence range passed into tcp_sacktag_one() is
correct we need only have a special case adjustment for FACK.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Neal Cardwell authored and David S. Miller committed Feb 14, 2012
1 parent fbcf88b commit 0af2a0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,

BUG_ON(!pcount);

/* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
tp->lost_cnt_hint += pcount;

TCP_SKB_CB(prev)->end_seq += shifted;
TCP_SKB_CB(skb)->seq += shifted;

Expand Down

0 comments on commit 0af2a0d

Please sign in to comment.