]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: sanity check the channel switch counter value
authorLuciano Coelho <luciano.coelho@intel.com>
Wed, 8 Oct 2014 06:48:34 +0000 (09:48 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 9 Oct 2014 09:25:11 +0000 (11:25 +0200)
commit3a86ca915501ecc72f41d173e48af9ee2d72b865
treecf5564c90befa418c6d2adedb495747505db90b4
parent94d50ee55e2c8bd02e379c617f06ea87359ac7e1
nl80211: sanity check the channel switch counter value

The nl80211 channel switch count attribute
(NL80211_ATTR_CH_SWITCH_COUNT) is specified as u32, but the
specification uses u8 for the counter.  To make sure strange things
don't happen without informing the user, sanity check the value and
return -EINVAL if it doesn't fit in u8.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c