Commit 0d9fece7 authored by Baptiste Jonglez's avatar Baptiste Jonglez Committed by Richard Levitte
Browse files

afalg: Fix kernel version check



The check should reject kernel versions < 4.1.0, not <= 4.1.0.

The issue was spotted on OpenSUSE 42.1 Leap, since its linux/version.h
header advertises 4.1.0.

CLA: trivial
Fixes: 7f458a48 ("ALG: Add AFALG engine")
Signed-off-by: default avatarBaptiste Jonglez <git@bitsofnetworks.org>

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4618)
parent a0c26264
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@
#define K_MAJ   4
#define K_MAJ   4
#define K_MIN1  1
#define K_MIN1  1
#define K_MIN2  0
#define K_MIN2  0
#if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \
#if LINUX_VERSION_CODE < KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) || \
    !defined(AF_ALG)
    !defined(AF_ALG)
# ifndef PEDANTIC
# ifndef PEDANTIC
#  warning "AFALG ENGINE requires Kernel Headers >= 4.1.0"
#  warning "AFALG ENGINE requires Kernel Headers >= 4.1.0"
+1 −1
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@
# define K_MAJ   4
# define K_MAJ   4
# define K_MIN1  1
# define K_MIN1  1
# define K_MIN2  0
# define K_MIN2  0
# if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
# if LINUX_VERSION_CODE < KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2)
/*
/*
 * If we get here then it looks like there is a mismatch between the linux
 * If we get here then it looks like there is a mismatch between the linux
 * headers and the actual kernel version, so we have tried to compile with
 * headers and the actual kernel version, so we have tried to compile with