Skip to content

Commit

Permalink
[CWS] go back to full kernel version check
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Feb 14, 2022
1 parent 6ce6404 commit b2df5ef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/util/kernel/find_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func validateHeaderDirs(hv Version, dirs []string, checkForCriticalHeaders bool)
continue
}

if !compareKernelVersionsRelaxed(dirv, hv) {
if dirv != hv {
log.Debugf("error validating %s: header version %s does not match host version %s", d, dirv, hv)
continue
}
Expand Down Expand Up @@ -320,7 +320,3 @@ func unloadKHeadersModule() error {
}
return nil
}

func compareKernelVersionsRelaxed(headerVersion, hostVersion Version) bool {
return headerVersion.Major() == hostVersion.Major() && headerVersion.Minor() == hostVersion.Minor()
}

0 comments on commit b2df5ef

Please sign in to comment.