Remove redundant arg from newEbpfTracker

This commit is contained in:
Michael Schubert
2017-03-09 16:17:52 +01:00
parent 250718d693
commit ce904fc56c
2 changed files with 2 additions and 7 deletions

View File

@@ -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)

View File

@@ -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)
}