Skip to content

Commit

Permalink
Match connections without PID only using UndefinedProcessID
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Jul 20, 2023
1 parent 41ffb2c commit 5fe78db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions process/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func GetProcessWithProfile(ctx context.Context, pid int) (process *Process, err

process, err = GetOrFindProcess(ctx, pid)
if err != nil {
log.Tracer(ctx).Warningf("process: failed to find process with PID: %s", err)
log.Tracer(ctx).Debugf("process: failed to find process with PID: %s", err)
return GetUnidentifiedProcess(ctx), err
}

Expand Down Expand Up @@ -54,8 +54,8 @@ func GetPidOfConnection(ctx context.Context, pktInfo *packet.Info) (pid int, con
fastSearch := pktInfo.Inbound
connInbound = pktInfo.Inbound

// FIXME: Only match for UndefinedProcessID when integrations have been updated.
if pktInfo.PID <= 0 {
// Check if we need to get the PID.
if pktInfo.PID == UndefinedProcessID {
log.Tracer(ctx).Tracef("process: getting pid from system network state")
pid, connInbound, err = state.Lookup(pktInfo, fastSearch)
if err != nil {
Expand Down

0 comments on commit 5fe78db

Please sign in to comment.