Index: head/sys/conf/config.mk =================================================================== --- head/sys/conf/config.mk +++ head/sys/conf/config.mk @@ -30,8 +30,10 @@ opt_inet6.h: @echo "#define INET6 1" > ${.TARGET} .endif +.if ${MK_IPSEC_SUPPORT} != "no" opt_ipsec.h: @echo "#define IPSEC_SUPPORT 1" > ${.TARGET} +.endif .if ${MK_RATELIMIT} != "no" opt_ratelimit.h: @echo "#define RATELIMIT 1" > ${.TARGET} @@ -59,6 +61,9 @@ .endif .if ${MK_INET6_SUPPORT} != "no" KERN_OPTS+= INET6 +.endif +.if ${MK_IPSEC_SUPPORT} != "no" +KERN_OPTS+= IPSEC_SUPPORT .endif .elif !defined(KERN_OPTS) # Add all the options that are mentioned in any opt_*.h file when we Index: head/sys/modules/Makefile =================================================================== --- head/sys/modules/Makefile +++ head/sys/modules/Makefile @@ -427,7 +427,7 @@ _if_gif= if_gif _if_gre= if_gre _ipfw_pmod= ipfw_pmod -.if ${MK_IPSEC_SUPPORT} != "no" +.if ${KERN_OPTS:MIPSEC_SUPPORT} _ipsec= ipsec .endif .endif Index: head/sys/modules/tcp/Makefile =================================================================== --- head/sys/modules/tcp/Makefile +++ head/sys/modules/tcp/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ # -SYSDIR?=${SRCTOP}/sys -.include "${SYSDIR}/conf/kern.opts.mk" +.include SUBDIR= \ ${_tcp_bbr} \ @@ -17,7 +16,7 @@ .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) -.if ${MK_IPSEC_SUPPORT} != "no" +.if ${KERN_OPTS:MIPSEC_SUPPORT} _tcpmd5= tcpmd5 .endif .endif