mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Kernel: When receiving unexpected TCP flags, print the flags
It'll be easier to understand what might be happening if we know which unexpected flags are actually showing up. :^)
This commit is contained in:
parent
f0dde1cee1
commit
6625edb5d2
1 changed files with 2 additions and 2 deletions
|
@ -435,11 +435,11 @@ void handle_tcp(IPv4Packet const& ipv4_packet, Time const& packet_timestamp)
|
||||||
|
|
||||||
switch (socket->state()) {
|
switch (socket->state()) {
|
||||||
case TCPSocket::State::Closed:
|
case TCPSocket::State::Closed:
|
||||||
dbgln("handle_tcp: unexpected flags in Closed state");
|
dbgln("handle_tcp: unexpected flags in Closed state ({:x})", tcp_packet.flags());
|
||||||
// TODO: we may want to send an RST here, maybe as a configurable option
|
// TODO: we may want to send an RST here, maybe as a configurable option
|
||||||
return;
|
return;
|
||||||
case TCPSocket::State::TimeWait:
|
case TCPSocket::State::TimeWait:
|
||||||
dbgln("handle_tcp: unexpected flags in TimeWait state");
|
dbgln("handle_tcp: unexpected flags in TimeWait state ({:x})", tcp_packet.flags());
|
||||||
(void)socket->send_tcp_packet(TCPFlags::RST);
|
(void)socket->send_tcp_packet(TCPFlags::RST);
|
||||||
socket->set_state(TCPSocket::State::Closed);
|
socket->set_state(TCPSocket::State::Closed);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue