]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
afalg: Fix kernel version check
authorBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 30 Oct 2017 10:38:09 +0000 (11:38 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 31 Oct 2017 10:19:47 +0000 (11:19 +0100)
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)

engines/e_afalg.c
test/afalgtest.c

index e6fa5472d37ccb0e80eb5524d2d93386e7524ae2..2f5ee4ccba2f996feb9eb3264ca03240e2f3006e 100644 (file)
@@ -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"
index 62dcdb22771c77dd913e401940b0c1c4c03f6941..18025ab92ab0fadd8450f4b464f8930097e9250a 100644 (file)
@@ -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