Commit 0834ae3c authored by Simon Wunderlich's avatar Simon Wunderlich Committed by Johannes Berg

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: default avatarSimon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent dda444d5
...@@ -823,6 +823,10 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata, ...@@ -823,6 +823,10 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,
if (err) if (err)
return false; 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.count = csa_ie.count;
params.chandef = csa_ie.chandef; params.chandef = csa_ie.chandef;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment