Commit bfd53c43 authored by Johannes Berg's avatar Johannes Berg Committed by Kelsey Skunberg

mac80211: consider more elements in parsing CRC

BugLink: https://bugs.launchpad.net/bugs/1868628

[ Upstream commit a04564c9 ]

We only use the parsing CRC for checking if a beacon changed,
and elements with an ID > 63 cannot be represented in the
filter. Thus, like we did before with WMM and Cisco vendor
elements, just statically add these forgotten items to the
CRC:
 - WLAN_EID_VHT_OPERATION
 - WLAN_EID_OPMODE_NOTIF

I guess that in most cases when VHT/HE operation change, the HT
operation also changed, and so the change was picked up, but we
did notice that pure operating mode notification changes were
ignored.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20200131111300.891737-22-luca@coelho.fi
[restrict to VHT for the mac80211 branch]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 024f209a
......@@ -939,15 +939,21 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
elem_parse_failed = true;
break;
case WLAN_EID_VHT_OPERATION:
if (elen >= sizeof(struct ieee80211_vht_operation))
if (elen >= sizeof(struct ieee80211_vht_operation)) {
elems->vht_operation = (void *)pos;
else
if (calc_crc)
crc = crc32_be(crc, pos - 2, elen + 2);
break;
}
elem_parse_failed = true;
break;
case WLAN_EID_OPMODE_NOTIF:
if (elen > 0)
if (elen > 0) {
elems->opmode_notif = pos;
else
if (calc_crc)
crc = crc32_be(crc, pos - 2, elen + 2);
break;
}
elem_parse_failed = true;
break;
case WLAN_EID_MESH_ID:
......
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