diff --git a/probe/endpoint/connection_tracker.go b/probe/endpoint/connection_tracker.go index 3479c318b..14bf7665b 100644 --- a/probe/endpoint/connection_tracker.go +++ b/probe/endpoint/connection_tracker.go @@ -42,7 +42,7 @@ func newConnectionTracker(conf connectionTrackerConfig) connectionTracker { } } // When ebpf will be active by default, check if it starts correctly otherwise fallback to flowWalk - et, err := newEbpfTracker(conf.UseEbpfConn) + et, err := newEbpfTracker() if err != nil { // TODO: fallback to flowWalker, when ebpf is enabled by default log.Errorf("Error setting up the ebpfTracker, connections will not be reported: %s", err) diff --git a/probe/endpoint/ebpf.go b/probe/endpoint/ebpf.go index bed984d42..07ce10f05 100644 --- a/probe/endpoint/ebpf.go +++ b/probe/endpoint/ebpf.go @@ -1,7 +1,6 @@ package endpoint import ( - "errors" "fmt" "regexp" "strconv" @@ -77,11 +76,7 @@ func isKernelSupported() error { return nil } -func newEbpfTracker(useEbpfConn bool) (eventTracker, error) { - if !useEbpfConn { - return nil, errors.New("ebpf tracker not enabled") - } - +func newEbpfTracker() (eventTracker, error) { if err := isKernelSupported(); err != nil { return nil, fmt.Errorf("kernel not supported: %v", err) }