diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a28e4db8a952..ad70a962c20e 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3504,6 +3504,11 @@ static bool tcp_process_frto(struct sock *sk, int flag) | |||
3504 | } | 3504 | } |
3505 | } else { | 3505 | } else { |
3506 | if (!(flag & FLAG_DATA_ACKED) && (tp->frto_counter == 1)) { | 3506 | if (!(flag & FLAG_DATA_ACKED) && (tp->frto_counter == 1)) { |
3507 | if (!tcp_packets_in_flight(tp)) { | ||
3508 | tcp_enter_frto_loss(sk, 2, flag); | ||
3509 | return true; | ||
3510 | } | ||
3511 | |||
3507 | /* Prevent sending of new data. */ | 3512 | /* Prevent sending of new data. */ |
3508 | tp->snd_cwnd = min(tp->snd_cwnd, | 3513 | tp->snd_cwnd = min(tp->snd_cwnd, |
3509 | tcp_packets_in_flight(tp)); | 3514 | tcp_packets_in_flight(tp)); |
@@ -5543,7 +5548,7 @@ slow_path: | |||
5543 | if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) | 5548 | if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) |
5544 | goto csum_error; | 5549 | goto csum_error; |
5545 | 5550 | ||
5546 | if (!th->ack) | 5551 | if (!th->ack && !th->rst) |
5547 | goto discard; | 5552 | goto discard; |
5548 | 5553 | ||
5549 | /* | 5554 | /* |
@@ -5649,8 +5654,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack, | |||
5649 | * the remote receives only the retransmitted (regular) SYNs: either | 5654 | * the remote receives only the retransmitted (regular) SYNs: either |
5650 | * the original SYN-data or the corresponding SYN-ACK is lost. | 5655 | * the original SYN-data or the corresponding SYN-ACK is lost. |
5651 | */ | 5656 | */ |
5652 | syn_drop = (cookie->len <= 0 && data && | 5657 | syn_drop = (cookie->len <= 0 && data && tp->total_retrans); |
5653 | inet_csk(sk)->icsk_retransmits); | ||
5654 | 5658 | ||
5655 | tcp_fastopen_cache_set(sk, mss, cookie, syn_drop); | 5659 | tcp_fastopen_cache_set(sk, mss, cookie, syn_drop); |
5656 | 5660 | ||
@@ -5988,7 +5992,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
5988 | goto discard; | 5992 | goto discard; |
5989 | } | 5993 | } |
5990 | 5994 | ||
5991 | if (!th->ack) | 5995 | if (!th->ack && !th->rst) |
5992 | goto discard; | 5996 | goto discard; |
5993 | 5997 | ||
5994 | if (!tcp_validate_incoming(sk, skb, th, 0)) | 5998 | if (!tcp_validate_incoming(sk, skb, th, 0)) |