From ddafc5dc98702990f6cab8b7290a4b09a965bd5f Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 23 Jul 2023 16:09:59 +0300 Subject: [PATCH] Kernel/Net: Make a debug message more detailed It helps to see which socket it is talking about here, especially if you can cross-reference it with other socket logging. --- Kernel/Net/NetworkTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 207249121e..cf5636b780 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -436,11 +436,11 @@ void handle_tcp(IPv4Packet const& ipv4_packet, UnixDateTime const& packet_timest switch (socket->state()) { case TCPSocket::State::Closed: - dbgln("handle_tcp: unexpected flags in Closed state ({:x})", tcp_packet.flags()); + dbgln("handle_tcp: unexpected flags in Closed state ({:x}) for socket with tuple {}", tcp_packet.flags(), tuple.to_string()); // TODO: we may want to send an RST here, maybe as a configurable option return; case TCPSocket::State::TimeWait: - dbgln("handle_tcp: unexpected flags in TimeWait state ({:x})", tcp_packet.flags()); + dbgln("handle_tcp: unexpected flags in TimeWait state ({:x}) for socket with tuple {}", tcp_packet.flags(), tuple.to_string()); (void)socket->send_tcp_packet(TCPFlags::RST); socket->set_state(TCPSocket::State::Closed); return;