diff options
author | 2021-01-09 21:00:58 +0000 | |
---|---|---|
committer | 2021-01-09 21:00:58 +0000 | |
commit | 3a0d29392a3974fe1b6540dab3583d65b23baf13 (patch) | |
tree | 365f20407c433ea6f2938fdf95862f0b39c402d4 | |
parent | Enforce range with sysctl_int_bounded in swap_encrypt_ctl (diff) | |
download | wireguard-openbsd-3a0d29392a3974fe1b6540dab3583d65b23baf13.tar.xz wireguard-openbsd-3a0d29392a3974fe1b6540dab3583d65b23baf13.zip |
Enforce range with sysctl_int_bounded in etherip_sysctl
OK millert@
-rw-r--r-- | sys/net/if_etherip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c index 15c26b63509..4a2a6592afa 100644 --- a/sys/net/if_etherip.c +++ b/sys/net/if_etherip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_etherip.c,v 1.47 2020/08/21 22:59:27 kn Exp $ */ +/* $OpenBSD: if_etherip.c,v 1.48 2021/01/09 21:00:58 gnezdo Exp $ */ /* * Copyright (c) 2015 Kazuya GODA <goda@openbsd.org> * @@ -767,7 +767,8 @@ etherip_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, switch (name[0]) { case ETHERIPCTL_ALLOW: NET_LOCK(); - error = sysctl_int(oldp, oldlenp, newp, newlen, ðerip_allow); + error = sysctl_int_bounded(oldp, oldlenp, newp, newlen, + ðerip_allow, 0, 1); NET_UNLOCK(); return (error); case ETHERIPCTL_STATS: |