Improve argument checking. Convert from seconds to some number of
inactivity countdown intervals (currently these are 5 seconds).
This commit is contained in:
parent
43dcf72c5f
commit
7b92b29893
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ieee80211.c,v 1.16 2004/06/06 05:28:58 dyoung Exp $ */
|
/* $NetBSD: ieee80211.c,v 1.17 2004/06/06 05:43:17 dyoung Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 Atsushi Onoe
|
* Copyright (c) 2001 Atsushi Onoe
|
||||||
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
|
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.11 2004/04/02 20:19:20 sam Exp $");
|
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.11 2004/04/02 20:19:20 sam Exp $");
|
||||||
#else
|
#else
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.16 2004/06/06 05:28:58 dyoung Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.17 2004/06/06 05:43:17 dyoung Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -934,8 +934,9 @@ sysctl_ieee80211_verify(SYSCTLFN_ARGS)
|
||||||
__func__, t, node.sysctl_num, rnode->sysctl_num));
|
__func__, t, node.sysctl_num, rnode->sysctl_num));
|
||||||
|
|
||||||
if (node.sysctl_num == ieee80211_inact_max_nodenum) {
|
if (node.sysctl_num == ieee80211_inact_max_nodenum) {
|
||||||
if (t < 0)
|
if (t < 1)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
t = roundup(t, IEEE80211_INACT_WAIT) / IEEE80211_INACT_WAIT;
|
||||||
#ifdef IEEE80211_DEBUG
|
#ifdef IEEE80211_DEBUG
|
||||||
} else if (node.sysctl_num == ieee80211_debug_nodenum) {
|
} else if (node.sysctl_num == ieee80211_debug_nodenum) {
|
||||||
if (t < 0 || t > 2)
|
if (t < 0 || t > 2)
|
||||||
|
|
Loading…
Reference in New Issue