mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:45:08 +00:00
Kernel: Prevent RST spam when we get an unexpected packet
This commit is contained in:
parent
98ce498922
commit
061c092fae
1 changed files with 1 additions and 3 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue