1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:57:35 +00:00

Kernel: Fix a crash introduced by my TCP RST fix

This commit is contained in:
Gunnar Beutner 2021-08-18 10:30:10 +02:00
parent c972afbea6
commit 6f19bf8501

View file

@ -410,9 +410,11 @@ 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 && !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);
if (!socket) {
if (!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;
}