Skip to content

Commit

Permalink
Disable protocol classification on rhel 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
hmahmood committed Jan 9, 2025
1 parent f20c26d commit 6e24699
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkg/network/tracer/connection/kprobe/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ var (
tracerOffsetGuesserRunner = offsetguess.TracerOffsets.Offsets

errCORETracerNotSupported = errors.New("CO-RE tracer not supported on this platform")

rhel9KernelVersion = kernel.VersionCode(5, 14, 0)
)

// ClassificationSupported returns true if the current kernel version supports the classification feature.
Expand All @@ -71,7 +73,23 @@ func ClassificationSupported(config *config.Config) bool {
return false
}

return currentKernelVersion >= classificationMinimumKernel
if currentKernelVersion < classificationMinimumKernel {
return false
}

// TODO: fix protocol classification is not supported on RHEL 9+
family, err := kernel.Family()
if err != nil {
log.Warnf("could not determine OS family: %s", err)
return false
}

if family == "rhel" && currentKernelVersion >= rhel9KernelVersion {
log.Warn("protocol classification is currently not supported on RHEL 9+")
return false
}

return true
}

// LoadTracer loads the co-re/prebuilt/runtime compiled network tracer, depending on config
Expand Down

0 comments on commit 6e24699

Please sign in to comment.