Skip to content

Commit

Permalink
correct polarity of initial connections
Browse files Browse the repository at this point in the history
Fixes #2644
  • Loading branch information
rade authored and Alfonso Acosta committed Jul 5, 2017
1 parent bfd53d2 commit 3d96174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions probe/endpoint/ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ func (t *EbpfTracker) feedInitialConnections(conns procspy.ConnIter, seenTuples
// We assume that tuple.fromPort < tuple.toPort is a connect event (outgoing)
canonical, ok := seenTuples[tuple.key()]
if (ok && canonical != tuple) || (!ok && tuple.fromPort < tuple.toPort) {
t.handleConnection(tracer.EventConnect, tuple, int(conn.Proc.PID), namespaceID)
} else {
t.handleConnection(tracer.EventAccept, tuple, int(conn.Proc.PID), namespaceID)
} else {
t.handleConnection(tracer.EventConnect, tuple, int(conn.Proc.PID), namespaceID)
}
}
for _, p := range processesWaitingInAccept {
Expand Down

0 comments on commit 3d96174

Please sign in to comment.