From 8bd0188537bfe2a24280e768b39bdc69a76101e1 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 10 Jul 2017 07:37:23 +0100 Subject: [PATCH] respect UseConntrack setting in ebpf initialisation --- probe/endpoint/connection_tracker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/probe/endpoint/connection_tracker.go b/probe/endpoint/connection_tracker.go index 242d86bbc..c7bd029b9 100644 --- a/probe/endpoint/connection_tracker.go +++ b/probe/endpoint/connection_tracker.go @@ -116,7 +116,9 @@ func (t *connectionTracker) performFlowWalk(rpt *report.Report) map[string]fourT func (t *connectionTracker) existingFlows() map[string]fourTuple { seenTuples := map[string]fourTuple{} - if err := IsConntrackSupported(t.conf.ProcRoot); t.conf.UseConntrack && err != nil { + if !t.conf.UseConntrack { + // log.Warnf("Not using conntrack: disabled") + } else if err := IsConntrackSupported(t.conf.ProcRoot); err != nil { log.Warnf("Not using conntrack: not supported by the kernel: %s", err) } else if existingFlows, err := existingConnections([]string{"--any-nat"}); err != nil { log.Errorf("conntrack existingConnections error: %v", err)