Page MenuHomeFreeBSD

sysctl: hide 2.x era compat node
ClosedPublic

Authored by kaktus on Dec 31 2019, 12:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 3:51 PM
Unknown Object (File)
Mon, Mar 18, 3:47 PM
Unknown Object (File)
Jan 3 2024, 10:11 AM
Unknown Object (File)
Jan 3 2024, 10:10 AM
Unknown Object (File)
Nov 7 2023, 10:26 PM
Unknown Object (File)
Nov 4 2023, 2:04 AM
Unknown Object (File)
Sep 2 2023, 7:17 PM
Unknown Object (File)
Sep 2 2023, 7:17 PM

Details

Summary

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 <antranigv@freebsd.am>

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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.