From f14416b5f1975c4e2fd46caafb4ff8cf4edf8507 Mon Sep 17 00:00:00 2001 From: Massimiliano Giovagnoli Date: Tue, 26 Sep 2023 21:27:49 +0200 Subject: [PATCH] fix(pkg/generate): filter kernel release in config autogeneration Signed-off-by: Massimiliano Giovagnoli --- pkg/generate/generate.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/generate/generate.go b/pkg/generate/generate.go index 8d79dbf..521a091 100644 --- a/pkg/generate/generate.go +++ b/pkg/generate/generate.go @@ -3,6 +3,11 @@ package generate import ( "errors" "fmt" + "log/slog" + "os" + "path/filepath" + "strings" + "github.com/falcosecurity/dbg-go/pkg/root" "github.com/falcosecurity/dbg-go/pkg/validate" "github.com/falcosecurity/driverkit/pkg/driverbuilder/builder" @@ -10,10 +15,6 @@ import ( json "github.com/json-iterator/go" "golang.org/x/sync/errgroup" "gopkg.in/yaml.v3" - "log/slog" - "os" - "path/filepath" - "strings" ) var ( @@ -118,7 +119,7 @@ func autogenerateConfigs(opts Options) error { // A goroutine for each distro errGrp.Go(func() error { for _, kernelEntry := range kernelEntries { - if !opts.KernelVersionFilter(kernelEntry.KernelRelease) { + if !opts.KernelReleaseFilter(kernelEntry.KernelRelease) { continue } if !opts.KernelVersionFilter(kernelEntry.KernelVersion) {