diff options
author | Thomas Pedersen <thomas@adapt-ip.com> | 2020-09-08 22:03:05 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-09-18 13:30:57 +0300 |
commit | 1d47f1198d58117735edc6b8b1a687db47883f1e (patch) | |
tree | e0baff5ba0d71f0ecc4905797e351b96a939c97c /net/wireless/util.c | |
parent | 68dbad8c656960292142832c3b44c63db9831d67 (diff) | |
download | linux-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.c | 5 |
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; |