HomeFreeBSD

sbin/sysctl: Always honor skip in sysctl_all

Description

sbin/sysctl: Always honor skip in sysctl_all

Fix broken CTLFLAG_SKIP when present on the first child of the requested
node.

We don't need to ignore skip for the first node because in sysctl_all()
we've implicitly visited the first node already when oid is specified.
The first call to show_var() in here is after we have iterated to the
next node. When the command line specifically requests a non-node sysctl
we go straight into show_var() without calling sysctl_all().

Reported by: jhb
Reviewed by: jhb
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D27674

Details

Provenance
freqlabsAuthored on Dec 23 2020, 5:42 PM
Differential Revision
D27674: sbin/sysctl: Always honor skip in sysctl_all
Parents
rG0ec2ce0d3273: Improve input validation for parameters in ASCONF and ASCONF-ACK chunks
Branches
Unknown
Tags
Unknown