HomeFreeBSD

carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH

Description

carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH

With recent change 110113bc086f, a vnet tunable can be initialized when
there is a corresponding kernel environment variable unless it is marked
with the flag CTLFLAG_NOFETCH.

The initialization may happen during early boot(linker preload), at that
time vnet0 has not been created. The hander carp_allow_sysctl() for the
tunable net.inet.carp.allow requires vnet, thus invoking it during early
boot will cause kernel panic.

The tunnable is initialized by vnet sysinit routine ipcarp_sysinit() so
let's just mark it with flag CTLFLAG_NOFETCH.

No functional change intended.

Fixes: 110113bc086f sysctl(9): Enable vnet sysctl variables to be loader tunable
MFC after: 2 week
Differential Revision: https://reviews.freebsd.org/D41525

Details

Provenance
zleiAuthored on Sep 9 2023, 8:10 AM
Differential Revision
D41525: Mark vnet loader tunnables with CTLFLAG_NOFETCH
Parents
rG205821a70ddd: kernel linker: Eliminate unneeded vnet propagation
Branches
Unknown
Tags
Unknown