conf/173471: [patch] can't set sysctls from /etc/sysctl.conf for OIDs created by loadable modules

Anton Yuzhaninov ayuzhaninov at
Thu Nov 8 12:40:02 UTC 2012

>Number:         173471
>Category:       conf
>Synopsis:       [patch] can't set sysctls from /etc/sysctl.conf for OIDs created by loadable modules
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 08 12:40:01 UTC 2012
>Originator:     Anton Yuzhaninov
>Release:        FreeBSD 10.0-CURRENT i386
System: FreeBSD 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r241615: Tue Oct 23 17:20:03 MSK 2012 root at i386

Some sysctl OID is created only after loading kernel module, where the defined.

E. g. net.inet.ip.dummynet.* sysctls can be set only after dummynet module is loaded.


Add to /etc/rc.conf
kld_list="ipfw dummynet"

Add to /etc/sysctl.conf

After reboot this sysctl will no be set.


To fix 'REQUIRE: kld' should be added to /etc/rc.d/sysctl
But this creates circular dependency, which can be resolved by removing
'REQUIRE: sysctl' from /etc/rc.d/hostid
It seems to be /etc/rc.d/hostid don't not depend on /etc/sysctl.conf settings.

--- patch begins here ---
Index: etc/rc.d/hostid
--- etc/rc.d/hostid	(revision 241615)
+++ etc/rc.d/hostid	(working copy)
@@ -28,7 +28,6 @@
 # PROVIDE: hostid
-# REQUIRE: sysctl
 # KEYWORD: nojail
 . /etc/rc.subr
Index: etc/rc.d/sysctl
--- etc/rc.d/sysctl	(revision 241615)
+++ etc/rc.d/sysctl	(working copy)
@@ -4,6 +4,7 @@
 # PROVIDE: sysctl
+# REQUIRE: kld
 . /etc/rc.subr
--- patch ends here ---

More information about the freebsd-bugs mailing list