Make default pid to be -1 and remove unsafe code

This commit is contained in:
Vladimir Stoilov
2023-06-23 16:41:21 +03:00
parent daeafa406d
commit 74b4ce0869
3 changed files with 48 additions and 20 deletions

View File

@@ -126,6 +126,7 @@ func GetProcessByRequestOrigin(ar *api.Request) (*Process, error) {
Protocol: packet.TCP,
Src: remoteIP, // source as in the process we are looking for
SrcPort: remotePort, // source as in the process we are looking for
PID: -1,
}
pid, _, err := GetPidOfConnection(ar.Context(), pkt)