diff options
author | Baptiste Jonglez <git@bitsofnetworks.org> | 2017-10-30 11:38:09 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-10-31 11:19:47 +0100 |
commit | 3ba70235be29cc39df7d859df2894c9de2961019 (patch) | |
tree | 6cf99039b3c64964a5a07e7cf73c1c84756c0640 | |
parent | afalg: Use eventfd2 syscall instead of eventfd (diff) | |
download | openssl-3ba70235be29cc39df7d859df2894c9de2961019.tar.xz openssl-3ba70235be29cc39df7d859df2894c9de2961019.zip |
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: Baptiste Jonglez <git@bitsofnetworks.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4617)
-rw-r--r-- | engines/e_afalg.c | 2 | ||||
-rw-r--r-- | test/afalgtest.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/e_afalg.c b/engines/e_afalg.c index e6fa5472d3..2f5ee4ccba 100644 --- a/engines/e_afalg.c +++ b/engines/e_afalg.c @@ -24,7 +24,7 @@ #define K_MAJ 4 #define K_MIN1 1 #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) # ifndef PEDANTIC # warning "AFALG ENGINE requires Kernel Headers >= 4.1.0" diff --git a/test/afalgtest.c b/test/afalgtest.c index 62dcdb2277..18025ab92a 100644 --- a/test/afalgtest.c +++ b/test/afalgtest.c @@ -29,7 +29,7 @@ static ENGINE *e; # define K_MAJ 4 # define K_MIN1 1 # 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 * headers and the actual kernel version, so we have tried to compile with |