Changeset 47827


Ignore:
Timestamp:
2015-12-10T13:40:55+01:00 (2 years ago)
Author:
nbd
Message:

kernel/modules: fix crypto API RNG for >=4.2

Since kernel 4.2, DRBG is the default crypto API RNG, replacing krng. As
DRBG is not enabled, there is no crypto API RNG available when running
kernel 4.2 or later. Because of this, IPsec SAs fail to install. In
strongSwan, this results in a vague error that is difficult to debug:

received netlink error: No such file or directory (2)

Solve this by adding DRBG to the kmod-crypto-rng package. As enabling
DRBG in the kernel config also enables the Jitterentropy RNG, include it
in kmod-crypto-rng instead of having it in a separate package.

Signed-off-by: Stijn Tintel <stijn@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/kernel/linux/modules/crypto.mk

    r47700 r47827  
    101101define KernelPackage/crypto-rng 
    102102  TITLE:=CryptoAPI random number generation 
    103   KCONFIG:=CONFIG_CRYPTO_RNG2 
    104   FILES:=$(LINUX_DIR)/crypto/rng.ko 
    105 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.2.0)),1) 
    106   FILES+=$(LINUX_DIR)/crypto/krng.ko 
    107 endif 
    108   AUTOLOAD:=$(call AutoLoad,09,rng krng) 
     103  KCONFIG:= \ 
     104        CONFIG_CRYPTO_DRBG \ 
     105        CONFIG_CRYPTO_JITTERENTROPY \ 
     106        CONFIG_CRYPTO_RNG2 
     107  FILES:= \ 
     108        $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \ 
     109        $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \ 
     110        $(LINUX_DIR)/crypto/krng.ko@lt4.2 \ 
     111        $(LINUX_DIR)/crypto/rng.ko 
     112  AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng) 
    109113  $(call AddDepends/crypto) 
    110114endef 
     
    112116$(eval $(call KernelPackage,crypto-rng)) 
    113117 
    114 define KernelPackage/crypto-rng-jitterentropy 
    115   TITLE:=Jitterentropy Non-Deterministic Random Number Generator 
    116   KCONFIG:=CONFIG_CRYPTO_JITTERENTROPY 
    117   FILES:= $(LINUX_DIR)/crypto/jitterentropy_rng.ko 
    118   AUTOLOAD:=$(call AutoLoad,10,jitterentropy-rng) 
    119   $(call AddDepends/crypto) 
    120 endef 
    121  
    122 $(eval $(call KernelPackage,crypto-rng-jitterentropy)) 
    123118 
    124119define KernelPackage/crypto-iv 
Note: See TracChangeset for help on using the changeset viewer.