diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-04-30 13:52:49 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-04-30 13:52:49 +0000 |
commit | 7c5f1ae64391939a0a4ff8e6bbfc241b488f22b3 (patch) | |
tree | 0982c6bb5708ff111cf37403f9d03169cce34ccb /sys/netinet6 | |
parent | b42af43093a4c8389ee5cf2b3372177d0fdcbc4e (diff) |
Rearrange the implementation of bounded sysctl. The primitive
functions are sysctl_int() and sysctl_rdint(). This brings us back
the 4.4BSD implementation. Then sysctl_int_bounded() builds the
magic for range checks on top. sysctl_bounded_arr() is a wrapper
around it to support multiple variables.
Introduce macros that describe the meaning of the magic boundary
values. Use these macros in obvious places.
input and OK gnezdo@ mvs@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index cb50b32bdcc..7d76fa7dbf9 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.232 2021/03/10 10:21:49 jsg Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.233 2021/04/30 13:52:48 bluhm Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -1339,9 +1339,9 @@ extern int ip6_mrtproto; #endif const struct sysctl_bounded_args ipv6ctl_vars[] = { - { IPV6CTL_DAD_PENDING, &ip6_dad_pending, 1, 0 }, + { IPV6CTL_DAD_PENDING, &ip6_dad_pending, SYSCTL_INT_READONLY }, #ifdef MROUTING - { IPV6CTL_MRTPROTO, &ip6_mrtproto, 1, 0 }, + { IPV6CTL_MRTPROTO, &ip6_mrtproto, SYSCTL_INT_READONLY }, #endif { IPV6CTL_FORWARDING, &ip6_forwarding, 0, 1 }, { IPV6CTL_SENDREDIRECTS, &ip6_sendredirects, 0, 1 }, |