diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-08-18 09:56:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 10:26:51 +0200 |
commit | c17f9adb1203501ae22f51188d02ed98b53128b7 (patch) | |
tree | 47f449dc62aa8682a813e44dbc17405857e508f8 /Kernel/Net | |
parent | 0bf867bb9a1a3113e72330f687da92d616d68f7a (diff) | |
download | serenity-c17f9adb1203501ae22f51188d02ed98b53128b7.zip |
Kernel: Don't respond to TCP RST packets
As seen with GitHub Pages and probably lots of other hosts this might
cause a loop if the peer decides to respond to our RST packet again.
Diffstat (limited to 'Kernel/Net')
-rw-r--r-- | Kernel/Net/NetworkTask.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 0a8933a902..bb81867313 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -410,7 +410,7 @@ void handle_tcp(IPv4Packet const& ipv4_packet, Time const& packet_timestamp) dbgln_if(TCP_DEBUG, "handle_tcp: looking for socket; tuple={}", tuple.to_string()); auto socket = TCPSocket::from_tuple(tuple); - if (!socket) { + if (!socket && !tcp_packet.has_rst()) { dbgln("handle_tcp: No TCP socket for tuple {}. Sending RST.", tuple.to_string()); send_tcp_rst(ipv4_packet, tcp_packet, adapter); return; |