Page MenuHomeFreeBSD

sysctl: hide 2.x era compat node

Authored by kaktus on Dec 31 2019, 12:29 PM.



r23081 introduced kern.dummy oid as a semi ABI compat for kern.maxsockbuf that was moved to a new namespace. It never functioned as an alias of any kind and was just returning 0 unconditionally, hence it was probably provided to keep some 3rd party programmes happy about sysctl(3) not reporting an error because of non-existing oid. After nearly 23 years it seems reasonable to just hide it from sysctl(8) list not to cause unnecessary confusion as for its purpose.

Reported by: Antranig Vartanian <>

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I suspect that the point of providing the kern.dummy was to ensure that the old consumers of kern.maxockbuf get some value instead of error. Basically, it provides ABI compatibility for something that is 1. binary 2. very old.

Does it make some obstacle for real work ?

No problems, no. I understand that it was introduced as a combat for 3rd party binaries that hardcoded 1.31 as the oid, but the value 0 isn't helpful either.
How about CTLFLAG_SKIP so it wouldn't show up in sysctl(8) list?

How about CTLFLAG_SKIP so it wouldn't show up in sysctl(8) list?

This would only remove the mib from enumeration, right ? Then it is fine.

kaktus retitled this revision from sysctl: remove unused node to sysctl: hide 2.x era compat node.
kaktus edited the summary of this revision. (Show Details)
kaktus set the repository for this revision to rS FreeBSD src repository - subversion.

Update diff to use CTLFLAG_SKIP instead of completely removing KERN_DUMMY.

Perhaps add spaces around '|' as required by style.

This revision is now accepted and ready to land.Jan 1 2020, 11:29 PM
This revision was automatically updated to reflect the committed changes.