Commit 7b514a88 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: accept RST without ACK flag

commit c3ae62af (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: default avatarEric Wong <>
Signed-off-by: default avatarEric Dumazet <>
Acked-by: default avatarNeal Cardwell <>
Tested-by: default avatarEric Wong <>
Signed-off-by: default avatarDavid S. Miller <>
parent cb59c87d
......@@ -5543,7 +5543,7 @@ slow_path:
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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment