Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (8 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Approved by: kib (mentor, blanket) Differential Revision: https://reviews.freebsd.org/D23628
This commit is contained in:
parent
ef06a80cdb
commit
c5a017219f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358276
@ -83,24 +83,30 @@ static int ipfwrite __P((dev_t, struct uio *, int));
|
||||
|
||||
SYSCTL_DECL(_net_inet);
|
||||
#define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \
|
||||
SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_VNET|access, \
|
||||
ptr, val, sysctl_ipf_int, "I", descr)
|
||||
SYSCTL_OID(parent, nbr, name, \
|
||||
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \
|
||||
ptr, val, sysctl_ipf_int, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_NAT(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_nat, "I", descr)
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT |access, \
|
||||
ptr, val, sysctl_ipf_int_nat, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_STATE(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_state, "I", descr)
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \
|
||||
ptr, val, sysctl_ipf_int_state, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_FRAG(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_frag, "I", descr)
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \
|
||||
ptr, val, sysctl_ipf_int_frag, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_AUTH(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN|CTLTYPE_INT|CTLFLAG_VNET|access, ptr, val, sysctl_ipf_int_auth, "I", descr)
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_NEEDGIANT | access, \
|
||||
ptr, val, sysctl_ipf_int_auth, "I", descr)
|
||||
static struct sysctl_ctx_list ipf_clist;
|
||||
#define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */
|
||||
#define CTLFLAG_RWO (CTLFLAG_RW|CTLFLAG_OFF)
|
||||
SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
|
||||
SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"IPF");
|
||||
SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_flags), 0, "IPF flags");
|
||||
SYSCTL_IPF(_net_inet_ipf, OID_AUTO, ipf_pass, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_pass), 0, "default pass/block");
|
||||
SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_active), 0, "IPF is active");
|
||||
|
Loading…
Reference in New Issue
Block a user