On Fri, 29 May 2020 19:22:40 +0000 (UTC) John Baldwin <j...@freebsd.org> wrote:
> Author: jhb > Date: Fri May 29 19:22:40 2020 > New Revision: 361633 > URL: https://svnweb.freebsd.org/changeset/base/361633 > > Log: > Consistently include opt_ipsec.h for consumers of > <netipsec/ipsec.h>. > This fixes ipsec.ko to include all of IPSEC_DEBUG. > > Reviewed by: imp > MFC after: 2 weeks > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D25046 > > Modified: > head/sys/net/if_enc.c > head/sys/net/if_ipsec.c > head/sys/netipsec/ipsec.h > head/sys/netipsec/ipsec_mbuf.c > head/sys/netipsec/xform_ah.c > head/sys/netipsec/xform_esp.c > head/sys/netipsec/xform_ipcomp.c > > Modified: head/sys/net/if_enc.c > ============================================================================== > --- head/sys/net/if_enc.c Fri May 29 19:21:35 2020 > (r361632) +++ head/sys/net/if_enc.c Fri May 29 19:22:40 > 2020 (r361633) @@ -32,6 +32,7 @@ > > #include "opt_inet.h" > #include "opt_inet6.h" > +#include "opt_ipsec.h" > > #include <sys/param.h> > #include <sys/systm.h> > > Modified: head/sys/net/if_ipsec.c > ============================================================================== > --- head/sys/net/if_ipsec.c Fri May 29 19:21:35 2020 > (r361632) +++ head/sys/net/if_ipsec.c Fri May 29 19:22:40 > 2020 (r361633) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); > > #include "opt_inet.h" > #include "opt_inet6.h" > +#include "opt_ipsec.h" > > #include <sys/param.h> > #include <sys/systm.h> > > Modified: head/sys/netipsec/ipsec.h > ============================================================================== > --- head/sys/netipsec/ipsec.h Fri May 29 19:21:35 2020 > (r361632) +++ head/sys/netipsec/ipsec.h Fri May 29 19:22:40 > 2020 (r361633) @@ -39,11 +39,6 @@ > #ifndef _NETIPSEC_IPSEC_H_ > #define _NETIPSEC_IPSEC_H_ > > -#if defined(_KERNEL) && !defined(_LKM) && !defined(KLD_MODULE) > -#include "opt_inet.h" > -#include "opt_ipsec.h" > -#endif > - > #include <net/pfkeyv2.h> > #include <netipsec/keydb.h> > > > Modified: head/sys/netipsec/ipsec_mbuf.c > ============================================================================== > --- head/sys/netipsec/ipsec_mbuf.c Fri May 29 19:21:35 > 2020 (r361632) +++ head/sys/netipsec/ipsec_mbuf.c Fri > May 29 19:22:40 2020 (r361633) @@ -32,6 +32,8 @@ > * IPsec-specific mbuf routines. > */ > > +#include "opt_ipsec.h" > + > #include <sys/param.h> > #include <sys/systm.h> > #include <sys/malloc.h> > > Modified: head/sys/netipsec/xform_ah.c > ============================================================================== > --- head/sys/netipsec/xform_ah.c Fri May 29 19:21:35 > 2020 (r361632) +++ head/sys/netipsec/xform_ah.c Fri May > 29 19:22:40 2020 (r361633) @@ -38,6 +38,7 @@ > */ > #include "opt_inet.h" > #include "opt_inet6.h" > +#include "opt_ipsec.h" > > #include <sys/param.h> > #include <sys/systm.h> > > Modified: head/sys/netipsec/xform_esp.c > ============================================================================== > --- head/sys/netipsec/xform_esp.c Fri May 29 19:21:35 > 2020 (r361632) +++ head/sys/netipsec/xform_esp.c Fri > May 29 19:22:40 2020 (r361633) @@ -37,6 +37,7 @@ > */ > #include "opt_inet.h" > #include "opt_inet6.h" > +#include "opt_ipsec.h" > > #include <sys/param.h> > #include <sys/systm.h> > > Modified: head/sys/netipsec/xform_ipcomp.c > ============================================================================== > --- head/sys/netipsec/xform_ipcomp.c Fri May 29 19:21:35 > 2020 (r361632) +++ head/sys/netipsec/xform_ipcomp.c Fri > May 29 19:22:40 2020 (r361633) @@ -33,6 +33,7 @@ > /* IP payload compression protocol (IPComp), see RFC 2393 */ > #include "opt_inet.h" > #include "opt_inet6.h" > +#include "opt_ipsec.h" > > #include <sys/param.h> > #include <sys/systm.h> > _______________________________________________ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscr...@freebsd.org" In my case, kernel build (make buildkernel) fails with the comnpiler error shown below while compiling ipsec kernel module. Kernel has IPSEC support enabled. Kind regards, oh [...] --- all_subdir_ipsec --- --- ipsec_mod.o --- /usr/src/sys/netipsec/ipsec_mod.c:114:3: error: implicit declaration of function 'ipsec_support_enable' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ipsec_support_enable(ipv4_ipsec_support, &ipv4_methods); ^ /usr/src/sys/netipsec/ipsec_mod.c:125:3: error: implicit declaration of function 'ipsec_support_disable' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ipsec_support_disable(ipv4_ipsec_support); ^ --- all_subdir_ipwfw --- Building /usr/obj/usr/src/amd64.amd64/sys/WALHALL/modules/usr/src/sys/modules/ipwfw/ipw_bss/ipw_bss.ko --- all_subdir_ipsec --- /usr/src/sys/netipsec/ipsec_mod.c:125:3: note: did you mean 'ipsec_support_enable'? /usr/src/sys/netipsec/ipsec_mod.c:114:3: note: 'ipsec_support_enable' declared here ipsec_support_enable(ipv4_ipsec_support, &ipv4_methods); ^ 2 errors generated. *** [ipsec_mod.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/ipsec
pgpzYN40QiYFk.pgp
Description: OpenPGP digital signature