mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-11 08:50:37 +00:00
Kernel: Prevent RST spam when we get an unexpected packet
This commit is contained in:
parent
98ce498922
commit
061c092fae
Notes:
sideshowbarker
2024-07-19 12:49:46 +09:00
Author: https://github.com/deoxxa Commit: https://github.com/SerenityOS/serenity/commit/061c092fae9 Pull-request: https://github.com/SerenityOS/serenity/pull/416
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…
Reference in a new issue