diff options
author | Simon Wunderlich <sw@simonwunderlich.de> | 2013-11-26 16:45:18 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-02 11:54:13 +0100 |
commit | 0834ae3c3af44480834cce128b6fef83006e537f (patch) | |
tree | f5ace0c4cfe57da6d5f8b14af33b84ddcf23dd8c /net/mac80211 | |
parent | dda444d52496aa8ddc501561bca580f1374a96a9 (diff) | |
download | linux-0834ae3c3af44480834cce128b6fef83006e537f.tar.gz linux-0834ae3c3af44480834cce128b6fef83006e537f.tar.bz2 linux-0834ae3c3af44480834cce128b6fef83006e537f.zip |
mac80211: check csa wiphy flag in ibss before switching
When external CSA IEs are received (beacons or action messages), a
channel switch is triggered as well. This should only be allowed on
devices which actually support channel switches, otherwise disconnect.
(For the corresponding userspace invocation, the wiphy flag is checked
in nl80211).
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ibss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 531be040b9ae..27a39de89679 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -823,6 +823,10 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata, if (err) return false; + /* channel switch is not supported, disconnect */ + if (!(sdata->local->hw.wiphy->flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) + goto disconnect; + params.count = csa_ie.count; params.chandef = csa_ie.chandef; |