This patch fixes a problem, which exists if you have IPSEC in your kernel
and want to have crypto support loaded as KLD. By moving zlib to separate module and adding MODULE_DEPEND directives, it is possible to use such configuration without complication. Otherwise, since IPSEC is linked with zlib (just like crypto.ko) you'll get following error: interface zlib.1 already present in the KLD 'kernel'! Approved by: cognet (mentor)
This commit is contained in:
parent
cf62a08f65
commit
51b4ccb464
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156072
@ -6,7 +6,6 @@
|
||||
.PATH: ${.CURDIR}/../../crypto/des
|
||||
.PATH: ${.CURDIR}/../../crypto/rijndael
|
||||
.PATH: ${.CURDIR}/../../crypto/sha2
|
||||
.PATH: ${.CURDIR}/../../net
|
||||
|
||||
KMOD = crypto
|
||||
SRCS = crypto.c
|
||||
@ -15,7 +14,6 @@ SRCS += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
|
||||
SRCS += skipjack.c bf_enc.c bf_skey.c
|
||||
SRCS += des_ecb.c des_enc.c des_setkey.c
|
||||
SRCS += sha1.c sha2.c
|
||||
SRCS += zlib.c
|
||||
SRCS += opt_param.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
@ -16,7 +16,7 @@ PPP_IPX?= 0 # 0/1 - requires IPX to be configured in kernel
|
||||
SRCS+= bsd_comp.c
|
||||
.endif
|
||||
.if ${PPP_DEFLATE} > 0
|
||||
SRCS+= ppp_deflate.c zlib.c
|
||||
SRCS+= ppp_deflate.c
|
||||
.endif
|
||||
|
||||
.if !defined(KERNBUILDDIR)
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/mutex.h>
|
||||
|
||||
#include <net/ppp_defs.h>
|
||||
@ -676,3 +677,4 @@ z_incomp(arg, mi)
|
||||
state->stats.unc_bytes += rlen;
|
||||
state->stats.unc_packets++;
|
||||
}
|
||||
MODULE_DEPEND(ppp_deflate, zlib, 1, 1, 1);
|
||||
|
@ -820,3 +820,4 @@ static moduledata_t cryptodev_mod = {
|
||||
MODULE_VERSION(cryptodev, 1);
|
||||
DECLARE_MODULE(cryptodev, cryptodev_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
|
||||
MODULE_DEPEND(cryptodev, crypto, 1, 1, 1);
|
||||
MODULE_DEPEND(cryptodev, zlib, 1, 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user