Skip to content

Commit

Permalink
remove isLoopback
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlu committed Dec 16, 2024
1 parent 5c29756 commit 26ece99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/network/tracer/connection/ebpfless_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ func (t *ebpfLessTracer) processConnection(
return nil
}

isLoopback := t.scratchConn.Source.IsLoopback() && t.scratchConn.Dest.IsLoopback()
t.determineConnectionDirection(t.scratchConn, pktType, isLoopback)
t.determineConnectionDirection(t.scratchConn, pktType)
flipSourceDest(t.scratchConn, pktType)

t.m.Lock()
Expand Down Expand Up @@ -247,7 +246,7 @@ func flipSourceDest(conn *network.ConnectionStats, pktType uint8) {
}
}

func (t *ebpfLessTracer) determineConnectionDirection(conn *network.ConnectionStats, pktType uint8, _isLoopback bool) {
func (t *ebpfLessTracer) determineConnectionDirection(conn *network.ConnectionStats, pktType uint8) {
t.m.Lock()
defer t.m.Unlock()

Expand Down

0 comments on commit 26ece99

Please sign in to comment.