summaryrefslogtreecommitdiff
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@adapt-ip.com>2020-09-08 22:03:05 +0300
committerJohannes Berg <johannes.berg@intel.com>2020-09-18 13:30:57 +0300
commit1d47f1198d58117735edc6b8b1a687db47883f1e (patch)
treee0baff5ba0d71f0ecc4905797e351b96a939c97c /net/wireless/util.c
parent68dbad8c656960292142832c3b44c63db9831d67 (diff)
downloadlinux-1d47f1198d58117735edc6b8b1a687db47883f1e.tar.xz
nl80211: correctly validate S1G beacon head
The S1G beacon has a different header size than regular beacons, so adjust the beacon head validator. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> Link: https://lore.kernel.org/r/20200908190323.15814-5-thomas@adapt-ip.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 4a9ff9ef513f..49e7c0cbbf62 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -399,6 +399,11 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
{
unsigned int hdrlen = 24;
+ if (ieee80211_is_ext(fc)) {
+ hdrlen = 4;
+ goto out;
+ }
+
if (ieee80211_is_data(fc)) {
if (ieee80211_has_a4(fc))
hdrlen = 30;