]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes
authorRyan Moeller <freqlabs@FreeBSD.org>
Wed, 27 Jan 2021 19:27:46 +0000 (14:27 -0500)
committerRyan Moeller <freqlabs@FreeBSD.org>
Fri, 29 Jan 2021 00:36:46 +0000 (19:36 -0500)
commit5d58f58b0d612913fd280a6acaf174019bd465ba
tree7ebd5d0e2214cb30b48d18406fcd495c88973aa8
parent40cb0344eb27e0bb9a112ff50812a7e77816d6be
sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes

The OID is saved when we encounter CTLFLAG_SKIP so that descendants can
be skipped as well. We then must not update the skip OID until we are
out of the node. This was achieved by resetting the skip OID once the
prefix no longer matches, but the case where the OID we reset on has
CTLFLAG_SKIP was not accounted for.

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

(cherry picked from commit 65efb73fbddd44116fd39b03991386a67422ba6d)
sbin/sysctl/sysctl.c