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.
This commit is contained in:
parent
95bcffd713
commit
ddafc5dc98
Notes:
sideshowbarker
2024-07-17 01:13:25 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/ddafc5dc98 Pull-request: https://github.com/SerenityOS/serenity/pull/20158 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅ Reviewed-by: https://github.com/timschumi
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue