Skip to content

Commit

Permalink
fix(pkg/generate): filter kernel release in config autogeneration
Browse files Browse the repository at this point in the history
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
  • Loading branch information
maxgio92 committed Sep 26, 2023
1 parent 4ebdd75 commit f14416b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ 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"
"github.com/falcosecurity/driverkit/pkg/kernelrelease"
json "github.com/json-iterator/go"
"golang.org/x/sync/errgroup"
"gopkg.in/yaml.v3"
"log/slog"
"os"
"path/filepath"
"strings"
)

var (
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f14416b

Please sign in to comment.