diff --git a/pkg/network/tracer/ebpf_conntracker.go b/pkg/network/tracer/ebpf_conntracker.go index 5c97b4983418f..b81f179754c47 100644 --- a/pkg/network/tracer/ebpf_conntracker.go +++ b/pkg/network/tracer/ebpf_conntracker.go @@ -113,10 +113,6 @@ func NewEBPFConntracker(cfg *config.Config, telemetrycomp telemetryComp.Componen } } - if prebuilt.IsDeprecated() { - log.Warn("using deprecated prebuilt conntracker") - } - var isPrebuilt bool if m == nil { m, err = ebpfConntrackerPrebuiltCreator(cfg) @@ -127,6 +123,10 @@ func NewEBPFConntracker(cfg *config.Config, telemetrycomp telemetryComp.Componen isPrebuilt = true } + if isPrebuilt && prebuilt.IsDeprecated() { + log.Warn("using deprecated prebuilt conntracker") + } + err = m.Start() if err != nil { _ = m.Stop(manager.CleanAll)