From owner-svn-src-projects@freebsd.org Thu Dec 22 15:46:13 2016 Return-Path: Delivered-To: svn-src-projects@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 A235FC8B735 for ; Thu, 22 Dec 2016 15:46:13 +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 633DE1259; Thu, 22 Dec 2016 15:46:13 +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 uBMFkCHi010575; Thu, 22 Dec 2016 15:46:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBMFkCR0010573; Thu, 22 Dec 2016 15:46:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201612221546.uBMFkCR0010573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 22 Dec 2016 15:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r310416 - projects/ipsec/sys/netipsec X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 15:46:13 -0000 Author: ae Date: Thu Dec 22 15:46:12 2016 New Revision: 310416 URL: https://svnweb.freebsd.org/changeset/base/310416 Log: Fix the build. Modified: projects/ipsec/sys/netipsec/ipsec_support.h projects/ipsec/sys/netipsec/subr_ipsec.c Modified: projects/ipsec/sys/netipsec/ipsec_support.h ============================================================================== --- projects/ipsec/sys/netipsec/ipsec_support.h Thu Dec 22 15:19:31 2016 (r310415) +++ projects/ipsec/sys/netipsec/ipsec_support.h Thu Dec 22 15:46:12 2016 (r310416) @@ -113,7 +113,7 @@ extern const struct ipsec_support * cons #define IPSEC_CAPS(proto, m, ...) \ (*(proto ## _ipsec_methods)->capability)(m, __VA_ARGS__) #define IPSEC_HDRSIZE(proto, inp) \ - (*(proto ## _ipsec_methods)->hdrsize)(m, inp) + (*(proto ## _ipsec_methods)->hdrsize)(inp) #elif defined(IPSEC_SUPPORT) Modified: projects/ipsec/sys/netipsec/subr_ipsec.c ============================================================================== --- projects/ipsec/sys/netipsec/subr_ipsec.c Thu Dec 22 15:19:31 2016 (r310415) +++ projects/ipsec/sys/netipsec/subr_ipsec.c Thu Dec 22 15:46:12 2016 (r310416) @@ -64,11 +64,11 @@ RM_SYSINIT(ipsec_kmod_lock, &ipsec_kmod_ #define METHOD_DECL(...) __VA_ARGS__ #define METHOD_ARGS(...) __VA_ARGS__ -#define IPSEC_KMOD_METHOD(name, sc, method, decl, args) \ -name (decl) \ +#define IPSEC_KMOD_METHOD(type, name, sc, method, decl, args) \ +type name (decl) \ { \ struct rm_priotracker tracker; \ - int ret; \ + type ret; \ IPSEC_ASSERT(sc != NULL, ("called with NULL methods")); \ rm_rlock(&ipsec_kmod_lock, &tracker); \ ret = (*sc->method)(args); \ @@ -111,19 +111,19 @@ const int tcp_ipsec_support = 1; volatile int tcp_ipsec_support = 0; const struct tcpmd5_support * volatile tcp_ipsec_methods = NULL; -int IPSEC_KMOD_METHOD(tcpmd5_kmod_input, +IPSEC_KMOD_METHOD(int, tcpmd5_kmod_input, tcp_ipsec_methods, input, METHOD_DECL(struct mbuf *m, struct tcphdr *th, u_char *buf), METHOD_ARGS(m, th, buf) ) -int IPSEC_KMOD_METHOD(tcpmd5_kmod_output, +IPSEC_KMOD_METHOD(int, tcpmd5_kmod_output, tcp_ipsec_methods, output, METHOD_DECL(struct mbuf *m, struct tcphdr *th, u_char *buf), METHOD_ARGS(m, th, buf) ) -int IPSEC_KMOD_METHOD(tcpmd5_kmod_pcbctl, +IPSEC_KMOD_METHOD(int, tcpmd5_kmod_pcbctl, tcp_ipsec_methods, pcbctl, METHOD_DECL(struct inpcb *inp, struct sockopt *sopt), METHOD_ARGS(inp, sopt) @@ -156,7 +156,7 @@ static struct ipsec_support ipv6_ipsec = .output = ipsec6_output, .pcbctl = ipsec6_pcbctl, .capability = ipsec6_capability, - .check_policy = ipsec6_in_reject + .check_policy = ipsec6_in_reject, .hdrsize = ipsec_hdrsiz_inpcb }; const int ipv6_ipsec_support = 1; @@ -171,13 +171,13 @@ volatile int ipv4_ipsec_support = 0; const struct ipsec_support * volatile ipv4_ipsec_methods = NULL; const struct udpencap_support * volatile udp_ipsec_methods = NULL; -int IPSEC_KMOD_METHOD(udpencap_kmod_input, +IPSEC_KMOD_METHOD(int, udpencap_kmod_input, udp_ipsec_methods, input, METHOD_DECL(struct mbuf *m, int off, int af), METHOD_ARGS(m, off, af) ) -int IPSEC_KMOD_METHOD(udpencap_kmod_pcbctl, +IPSEC_KMOD_METHOD(int, udpencap_kmod_pcbctl, udp_ipsec_methods, pcbctl, METHOD_DECL(struct inpcb *inp, struct sockopt *sopt), METHOD_ARGS(inp, sopt) @@ -189,37 +189,37 @@ volatile int ipv6_ipsec_support = 0; const struct ipsec_support * volatile ipv6_ipsec_methods = NULL; #endif -int IPSEC_KMOD_METHOD(ipsec_kmod_input, sc, +IPSEC_KMOD_METHOD(int, ipsec_kmod_input, sc, input, METHOD_DECL(const struct ipsec_support *sc, struct mbuf *m, - int offset,int proto), METHOD_ARGS(m, offset, proto) + int offset, int proto), METHOD_ARGS(m, offset, proto) ) -int IPSEC_KMOD_METHOD(ipsec_kmod_check_policy, sc, +IPSEC_KMOD_METHOD(int, ipsec_kmod_check_policy, sc, check_policy, METHOD_DECL(const struct ipsec_support *sc, struct mbuf *m, struct inpcb *inp), METHOD_ARGS(m, inp) ) -int IPSEC_KMOD_METHOD(ipsec_kmod_forward, sc, +IPSEC_KMOD_METHOD(int, ipsec_kmod_forward, sc, forward, METHOD_DECL(const struct ipsec_support *sc, struct mbuf *m), (m) ) -int IPSEC_KMOD_METHOD(ipsec_kmod_output, sc, +IPSEC_KMOD_METHOD(int, ipsec_kmod_output, sc, output, METHOD_DECL(const struct ipsec_support *sc, struct mbuf *m, struct inpcb *inp), METHOD_ARGS(m, inp) ) -int IPSEC_KMOD_METHOD(ipsec_kmod_pcbctl, sc, +IPSEC_KMOD_METHOD(int, ipsec_kmod_pcbctl, sc, pcbctl, METHOD_DECL(const struct ipsec_support *sc, struct inpcb *inp, struct sockopt *sopt), METHOD_ARGS(inp, sopt) ) -size_t IPSEC_KMOD_METHOD(ipsec_kmod_hdrsize, sc, +IPSEC_KMOD_METHOD(size_t, ipsec_kmod_hdrsize, sc, hdrsize, METHOD_DECL(const struct ipsec_support *sc, struct inpcb *inp), (inp) ) -int static IPSEC_KMOD_METHOD(ipsec_kmod_caps, sc, +static IPSEC_KMOD_METHOD(int, ipsec_kmod_caps, sc, capability, METHOD_DECL(const struct ipsec_support *sc, struct mbuf *m, u_int cap), METHOD_ARGS(m, cap) )