Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5aa0d21 authored by Ujjal Roy's avatar Ujjal Roy Committed by Johannes Berg
Browse files

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: default avatarUjjal Roy <royujjal@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent bdfbec2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;