From 07e7e4479bceb70fa218122aafab87a5267e7fc8 Mon Sep 17 00:00:00 2001 From: Hasan Mahmood <6599778+hmahmood@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:50:40 -0600 Subject: [PATCH] [backport] [NPM] Fix prebuilt conntracker warning (#30779) --- pkg/network/tracer/ebpf_conntracker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)