提交 f5aa0d21 编写于 作者: U Ujjal Roy 提交者: Johannes Berg

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: NUjjal Roy <royujjal@gmail.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 bdfbec2d
......@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
u8 oshort = wdev->wiphy->retry_short;
int err;
if (retry->disabled ||
if (retry->disabled || retry->value < 1 || retry->value > 255 ||
(retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册