Skip to content

Commit

Permalink
[Fix] when parse kernel version failed, fallback to compatible mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyoush committed Sep 9, 2024
1 parent e827a9c commit 586d026
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,6 @@ func EnabledXdp() bool {

func NeedsRunningInCompatibleMode() bool {
kernel58, _ := version.NewVersion("5.8")
return viper.GetBool("compatible") || GetKernelVersion().LessThan(kernel58)
curKernelVersion := GetKernelVersion()
return viper.GetBool("compatible") || curKernelVersion == nil || curKernelVersion.LessThan(kernel58)
}

0 comments on commit 586d026

Please sign in to comment.