mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
Kernel: Prevent RST spam when we get an unexpected packet
This commit is contained in:
committed by
Andreas Kling
parent
98ce498922
commit
061c092fae
@@ -341,9 +341,7 @@ void handle_tcp(const EthernetFrameHeader& eth, int frame_size)
|
||||
switch (socket->state()) {
|
||||
case TCPSocket::State::Closed:
|
||||
kprintf("handle_tcp: unexpected flags in Closed state\n");
|
||||
socket->send_tcp_packet(TCPFlags::RST);
|
||||
socket->set_state(TCPSocket::State::Closed);
|
||||
kprintf("handle_tcp: Closed -> Closed\n");
|
||||
// TODO: we may want to send an RST here, maybe as a configurable option
|
||||
return;
|
||||
case TCPSocket::State::TimeWait:
|
||||
kprintf("handle_tcp: unexpected flags in TimeWait state\n");
|
||||
|
||||
Reference in New Issue
Block a user