From owner-svn-src-all@freebsd.org Sat May 30 00:47:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C70092F575F; Sat, 30 May 2020 00:47:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YjSS4n9Cz3VlV; Sat, 30 May 2020 00:47:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A7BD205D5; Sat, 30 May 2020 00:47:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04U0l4Rq097310; Sat, 30 May 2020 00:47:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04U0l4Mn097308; Sat, 30 May 2020 00:47:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202005300047.04U0l4Mn097308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 30 May 2020 00:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361638 - in head/sys: conf modules modules/tcp X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: conf modules modules/tcp X-SVN-Commit-Revision: 361638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 00:47:04 -0000 Author: jhb Date: Sat May 30 00:47:03 2020 New Revision: 361638 URL: https://svnweb.freebsd.org/changeset/base/361638 Log: Only build ipsec modules if the kernel includes IPSEC_SUPPORT. Honoring the kernel-supplied opt_ipsec.h in r361632 causes builds of ipsec modules to fail if the kernel doesn't include IPSEC_SUPPORT. However, the module can never be loaded into such a kernel, so only build the modules if the kernel includes IPSEC_SUPPORT. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D25059 Modified: head/sys/conf/config.mk head/sys/modules/Makefile head/sys/modules/tcp/Makefile Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Sat May 30 00:07:42 2020 (r361637) +++ head/sys/conf/config.mk Sat May 30 00:47:03 2020 (r361638) @@ -30,8 +30,10 @@ opt_inet.h: 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 @@ KERN_OPTS+= INET TCP_OFFLOAD .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 Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat May 30 00:07:42 2020 (r361637) +++ head/sys/modules/Makefile Sat May 30 00:47:03 2020 (r361638) @@ -427,7 +427,7 @@ _if_enc= if_enc _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 Modified: head/sys/modules/tcp/Makefile ============================================================================== --- head/sys/modules/tcp/Makefile Sat May 30 00:07:42 2020 (r361637) +++ head/sys/modules/tcp/Makefile Sat May 30 00:47:03 2020 (r361638) @@ -2,8 +2,7 @@ # $FreeBSD$ # -SYSDIR?=${SRCTOP}/sys -.include "${SYSDIR}/conf/kern.opts.mk" +.include SUBDIR= \ ${_tcp_bbr} \ @@ -17,7 +16,7 @@ _tcp_rack= rack .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