File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2587,8 +2587,10 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
2587
2587
return - EBUSY ;
2588
2588
2589
2589
if (before (TCP_SKB_CB (skb )-> seq , tp -> snd_una )) {
2590
- if (before (TCP_SKB_CB (skb )-> end_seq , tp -> snd_una ))
2591
- BUG ();
2590
+ if (unlikely (before (TCP_SKB_CB (skb )-> end_seq , tp -> snd_una ))) {
2591
+ WARN_ON_ONCE (1 );
2592
+ return - EINVAL ;
2593
+ }
2592
2594
if (tcp_trim_head (sk , skb , tp -> snd_una - TCP_SKB_CB (skb )-> seq ))
2593
2595
return - ENOMEM ;
2594
2596
}
@@ -3117,6 +3119,7 @@ static void tcp_connect_init(struct sock *sk)
3117
3119
sock_reset_flag (sk , SOCK_DONE );
3118
3120
tp -> snd_wnd = 0 ;
3119
3121
tcp_init_wl (tp , 0 );
3122
+ tcp_write_queue_purge (sk );
3120
3123
tp -> snd_una = tp -> write_seq ;
3121
3124
tp -> snd_sml = tp -> write_seq ;
3122
3125
tp -> snd_up = tp -> write_seq ;
You can’t perform that action at this time.
0 commit comments