Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Simon Wunderlich and committed by
Johannes Berg
0834ae3c dda444d5

+4
+4
net/mac80211/ibss.c
··· 823 823 if (err) 824 824 return false; 825 825 826 + /* channel switch is not supported, disconnect */ 827 + if (!(sdata->local->hw.wiphy->flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) 828 + goto disconnect; 829 + 826 830 params.count = csa_ie.count; 827 831 params.chandef = csa_ie.chandef; 828 832