From afa696bb4825b7c4a838e96bc857d1fa00e02ea1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 13 Oct 2022 11:18:12 +0200 Subject: [PATCH] Classify unidentified localhost connections as unidentified instead of unsolicited --- network/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/connection.go b/network/connection.go index d87964f9..3d5ba694 100644 --- a/network/connection.go +++ b/network/connection.go @@ -333,7 +333,7 @@ func NewConnectionFromFirstPacket(pkt packet.Packet) *Connection { proc, inbound, err := process.GetProcessByConnection(pkt.Ctx(), pkt.Info()) if err != nil { log.Tracer(pkt.Ctx()).Debugf("network: failed to find process of packet %s: %s", pkt, err) - if inbound { + if inbound && !netutils.ClassifyIP(pkt.Info().Dst).IsLocalhost() { proc = process.GetUnsolicitedProcess(pkt.Ctx()) } else { proc = process.GetUnidentifiedProcess(pkt.Ctx())