forked from luck/tmp_suning_uos_patched
tcp: accept RST without ACK flag
commit c3ae62af8e
(tcp: should drop incoming frames without ACK flag
set) added a regression on the handling of RST messages.
RST should be allowed to come even without ACK bit set. We validate
the RST by checking the exact sequence, as requested by RFC 793 and
5961 3.2, in tcp_validate_incoming()
Reported-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Tested-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cb59c87dbc
commit
7b514a886b
|
@ -5543,7 +5543,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
|
|||
if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
|
||||
goto csum_error;
|
||||
|
||||
if (!th->ack)
|
||||
if (!th->ack && !th->rst)
|
||||
goto discard;
|
||||
|
||||
/*
|
||||
|
@ -5988,7 +5988,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
|
|||
goto discard;
|
||||
}
|
||||
|
||||
if (!th->ack)
|
||||
if (!th->ack && !th->rst)
|
||||
goto discard;
|
||||
|
||||
if (!tcp_validate_incoming(sk, skb, th, 0))
|
||||
|
|
Loading…
Reference in New Issue
Block a user