diff --git a/internal/pwru/utils.go b/internal/pwru/utils.go index 791b9781..c81fdf7c 100644 --- a/internal/pwru/utils.go +++ b/internal/pwru/utils.go @@ -189,3 +189,8 @@ func HaveBPFLinkTracing() bool { return true } + +func HaveAvailableFilterFunctions() bool { + _, err := getAvailableFilterFunctions() + return err == nil +} diff --git a/main.go b/main.go index 19a86ef9..c28f9841 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func main() { // has been backported to the stable, kprobe-multi cannot be used when attaching // to kmods. if flags.Backend == "" && len(flags.KMods) == 0 { - useKprobeMulti = pwru.HaveBPFLinkKprobeMulti() + useKprobeMulti = pwru.HaveBPFLinkKprobeMulti() && pwru.HaveAvailableFilterFunctions() } else if flags.Backend == pwru.BackendKprobeMulti { useKprobeMulti = true }