Page MenuHomeFreeBSD

Only build ipsec modules if the kernel includes IPSEC_SUPPORT.
ClosedPublic

Authored by jhb on May 30 2020, 12:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 4:20 PM
Unknown Object (File)
Sep 16 2024, 4:10 PM
Unknown Object (File)
Sep 14 2024, 9:17 AM
Unknown Object (File)
Sep 12 2024, 7:55 PM
Unknown Object (File)
Sep 4 2024, 6:36 AM
Unknown Object (File)
Jul 19 2024, 1:26 PM
Unknown Object (File)
Jul 18 2024, 3:43 PM
Unknown Object (File)
Jul 18 2024, 3:26 PM
Subscribers

Details

Summary

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.

Test Plan
  • MALTA64 (currently broken) now builds ok by skipping these two modules
  • GENERIC (amd64) still builds these two modules

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.May 30 2020, 12:00 AM
jhb created this revision.

This fixes build failures I was just seeing on my RB800 powerpcspe test board.

This is fine... it does highlight a bit more the impedance mismatch between kernel build and stand alone builds as options bleed out of the kernel...

It's not the first one, though, and it's done in the same way as the others, so no objections.

This revision is now accepted and ready to land.May 30 2020, 12:30 AM

I feel like it's the first one where we are using KERN_OPTS instead of MK_FOO. I think this is the right direction though, and I even think we should be using KERN_OPTS instead of MK_INET_* even so that we wouldn't include kernel modules that require INET for kernel configs that don't include INET, etc. (e.g. LINT-NOIP).

In particular, LINT-NO* wouldn't have to use WITHOUT_INET_* variables in makeoptions if we switched the module Makefiles over to using KERN_OPTS instead of MK_INET_*. Simply removing INET from a kernel config would turn off the requisite modules.