]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ipfw: reload sysctl.conf variables if needed
authorEugene Grosbein <eugen@FreeBSD.org>
Mon, 17 May 2021 21:03:15 +0000 (04:03 +0700)
committerEugene Grosbein <eugen@FreeBSD.org>
Mon, 17 May 2021 21:03:15 +0000 (04:03 +0700)
commitf5b5de1a3210234f3a6864c88a2d3e11ac2dbf04
tree6500a2eba5a0ab394ae2f1ffa75ff1d3eb2b726f
parent4224dbf4c7c497130150eafb0442f5306389e068
ipfw: reload sysctl.conf variables if needed

Currently ipfw has multiple components that are not parts
of GENERIC kernel like dummynet etc. They can bring in important
sysctls if enabled with rc.conf(5) and loaded with ipfw startup script
by means of "required_modules" after initial consult
with /etc/sysctl.conf at boot time. Here is an example of one
increasing limit for dummynet hold queues that defaults to 100:

net.inet.ip.dummynet.pipe_slot_limit=1000

This makes it possible to use ipfw/dummynet rules such as:

ipfw pipe 1 config bw 50Mbit/s queue 1000

Such rule is rejected unless above sysctl is applied.
Another example is a group of net.inet.ip.alias.* sysctls
created after libalias.ko loaded as dependency of ipfw_nat.

This is not a problem if corresponding code compiled in custom kernel
so sysctls exist when sysctl.conf is read early or kernel modules
loaded with a loader. This change makes it work also for GENERIC
and modules loaded by means of rc.conf(5) settings.

MFC after: 1 month
libexec/rc/rc.d/ipfw