Date: Wed, 25 Jan 2017 03:15:02 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r312734 - in projects/ipsec/sys: modules/ipsec netinet Message-ID: <201701250315.v0P3F2um073467@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Wed Jan 25 03:15:02 2017 New Revision: 312734 URL: https://svnweb.freebsd.org/changeset/base/312734 Log: Build NAT-T code only when INET support is enabled. Modified: projects/ipsec/sys/modules/ipsec/Makefile projects/ipsec/sys/netinet/udp_usrreq.c Modified: projects/ipsec/sys/modules/ipsec/Makefile ============================================================================== --- projects/ipsec/sys/modules/ipsec/Makefile Wed Jan 25 02:33:17 2017 (r312733) +++ projects/ipsec/sys/modules/ipsec/Makefile Wed Jan 25 03:15:02 2017 (r312734) @@ -4,8 +4,9 @@ KMOD= ipsec SRCS= if_ipsec.c ipsec.c ipsec_input.c ipsec_mbuf.c ipsec_mod.c \ - ipsec_output.c udpencap.c xform_ah.c xform_esp.c xform_ipcomp.c \ + ipsec_output.c xform_ah.c xform_esp.c xform_ipcomp.c \ opt_inet.h opt_inet6.h opt_ipsec.h opt_sctp.h +SRCS.INET= udpencap.c opt_ipsec.h: @echo "#define IPSEC_SUPPORT 1" > ${.TARGET} Modified: projects/ipsec/sys/netinet/udp_usrreq.c ============================================================================== --- projects/ipsec/sys/netinet/udp_usrreq.c Wed Jan 25 02:33:17 2017 (r312733) +++ projects/ipsec/sys/netinet/udp_usrreq.c Wed Jan 25 03:15:02 2017 (r312734) @@ -1007,6 +1007,7 @@ udp_ctloutput(struct socket *so, struct case SOPT_SET: switch (sopt->sopt_name) { #if defined(IPSEC) || defined(IPSEC_SUPPORT) +#ifdef INET case UDP_ENCAP: if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); @@ -1014,7 +1015,8 @@ udp_ctloutput(struct socket *so, struct } error = UDPENCAP_PCBCTL(inp, sopt); break; -#endif +#endif /* INET */ +#endif /* IPSEC */ case UDPLITE_SEND_CSCOV: case UDPLITE_RECV_CSCOV: if (!isudplite) { @@ -1052,6 +1054,7 @@ udp_ctloutput(struct socket *so, struct case SOPT_GET: switch (sopt->sopt_name) { #if defined(IPSEC) || defined(IPSEC_SUPPORT) +#ifdef INET case UDP_ENCAP: if (!IPSEC_ENABLED(ipv4)) { INP_WUNLOCK(inp); @@ -1059,7 +1062,8 @@ udp_ctloutput(struct socket *so, struct } error = UDPENCAP_PCBCTL(inp, sopt); break; -#endif +#endif /* INET */ +#endif /* IPSEC */ case UDPLITE_SEND_CSCOV: case UDPLITE_RECV_CSCOV: if (!isudplite) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701250315.v0P3F2um073467>