From owner-svn-src-head@freebsd.org Thu Feb 16 11:38:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F0A1CE219F; Thu, 16 Feb 2017 11:38:52 +0000 (UTC) (envelope-from ae@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 mx1.freebsd.org (Postfix) with ESMTPS id 072901F67; Thu, 16 Feb 2017 11:38:51 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1GBcp9t088582; Thu, 16 Feb 2017 11:38:51 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1GBcpFI088581; Thu, 16 Feb 2017 11:38:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702161138.v1GBcpFI088581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 16 Feb 2017 11:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313805 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 11:38:52 -0000 Author: ae Date: Thu Feb 16 11:38:50 2017 New Revision: 313805 URL: https://svnweb.freebsd.org/changeset/base/313805 Log: Fix LINT build for powerpc. Build kernel modules support only when both IPSEC and TCP_SIGNATURE are not defined. Reported by: emaste Modified: head/sys/netipsec/subr_ipsec.c Modified: head/sys/netipsec/subr_ipsec.c ============================================================================== --- head/sys/netipsec/subr_ipsec.c Thu Feb 16 10:36:00 2017 (r313804) +++ head/sys/netipsec/subr_ipsec.c Thu Feb 16 11:38:50 2017 (r313805) @@ -126,9 +126,12 @@ ipsec6_setsockaddrs(const struct mbuf *m #ifdef IPSEC_SUPPORT /* - * Declare IPSEC_SUPPORT as module even if IPSEC is defined. - * tcpmd5.ko module depends from IPSEC_SUPPORT. + * IPSEC_SUPPORT - loading of ipsec.ko and tcpmd5.ko is supported. + * IPSEC + IPSEC_SUPPORT - loading tcpmd5.ko is supported. + * IPSEC + TCP_SIGNATURE - all is build in the kernel, do not build + * IPSEC_SUPPORT. */ +#if !defined(IPSEC) || !defined(TCP_SIGNATURE) #define IPSEC_MODULE_INCR 2 static int ipsec_kmod_enter(volatile u_int *cntr) @@ -181,6 +184,30 @@ type name (decl) \ return (ret); \ } +static int +ipsec_support_modevent(module_t mod, int type, void *data) +{ + + switch (type) { + case MOD_LOAD: + return (0); + case MOD_UNLOAD: + return (EBUSY); + default: + return (EOPNOTSUPP); + } +} + +static moduledata_t ipsec_support_mod = { + "ipsec_support", + ipsec_support_modevent, + 0 +}; +DECLARE_MODULE(ipsec_support, ipsec_support_mod, SI_SUB_PROTO_DOMAIN, + SI_ORDER_ANY); +MODULE_VERSION(ipsec_support, 1); +#endif /* !IPSEC || !TCP_SIGNATURE */ + #ifndef TCP_SIGNATURE /* Declare TCP-MD5 support as kernel module. */ static struct tcpmd5_support tcpmd5_ipsec = { @@ -222,30 +249,7 @@ tcpmd5_support_disable(void) tcp_ipsec_support->methods = NULL; } } -#endif - -static int -ipsec_support_modevent(module_t mod, int type, void *data) -{ - - switch (type) { - case MOD_LOAD: - return (0); - case MOD_UNLOAD: - return (EBUSY); - default: - return (EOPNOTSUPP); - } -} - -static moduledata_t ipsec_support_mod = { - "ipsec_support", - ipsec_support_modevent, - 0 -}; -DECLARE_MODULE(ipsec_support, ipsec_support_mod, SI_SUB_PROTO_DOMAIN, - SI_ORDER_ANY); -MODULE_VERSION(ipsec_support, 1); +#endif /* !TCP_SIGNATURE */ #ifndef IPSEC /*