aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/wext-compat.c
diff options
context:
space:
mode:
authorUjjal Roy <royujjal@gmail.com>2014-01-09 10:46:14 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-01-09 11:05:28 -0500
commitf5aa0d21dd5ada040ff42b4d40357285e4ace441 (patch)
treec51ebb815d33aadf8f86df11ee8e1a42f3fb0abf /net/wireless/wext-compat.c
parentbdfbec2d2d240e9c528caae9c743801629b60166 (diff)
cfg80211: add sanity check for retry limit in wext-compat
Block setting the wrong values through iwconfig retry command. Add sanity checking before sending the retry limit to the driver. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r--net/wireless/wext-compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 051d961d4e28..5661a54ac7ee 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
370 u8 oshort = wdev->wiphy->retry_short; 370 u8 oshort = wdev->wiphy->retry_short;
371 int err; 371 int err;
372 372
373 if (retry->disabled || 373 if (retry->disabled || retry->value < 1 || retry->value > 255 ||
374 (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) 374 (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
375 return -EINVAL; 375 return -EINVAL;
376 376