tcp: bug fix Fast Open client retransmission
If SYN-ACK partially acks SYN-data, the client retransmits the remaining data by tcp_retransmit_skb(). This increments lost recovery state variables like tp->retrans_out in Open state. If loss recovery happens before the retransmission is acked, it triggers the WARN_ON check in tcp_fastretrans_alert(). For example: the client sends SYN-data, gets SYN-ACK acking only ISN, retransmits data, sends another 4 data packets and get 3 dupacks. Since the retransmission is not caused by network drop it should not update the recovery state variables. Further the server may return a smaller MSS than the cached MSS used for SYN-data, so the retranmission needs a loop. Otherwise some data will not be retransmitted until timeout or other loss recovery events. Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1afa471706
commit
93b174ad71
@@ -525,6 +525,7 @@ static inline __u32 cookie_v6_init_sequence(struct sock *sk,
|
||||
extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
|
||||
int nonagle);
|
||||
extern bool tcp_may_send_now(struct sock *sk);
|
||||
extern int __tcp_retransmit_skb(struct sock *, struct sk_buff *);
|
||||
extern int tcp_retransmit_skb(struct sock *, struct sk_buff *);
|
||||
extern void tcp_retransmit_timer(struct sock *sk);
|
||||
extern void tcp_xmit_retransmit_queue(struct sock *);
|
||||
|
Reference in New Issue
Block a user