HomeFreeBSD

net80211: correct input_sta length checks and control frame handling

Description

net80211: correct input_sta length checks and control frame handling

Correct input_sta "assertion" checks. CTS/ACK CTRL frames are shorter
then sizeof(struct ieee80211_frame_min) and were thus running into the
is_rx_tooshort error case.
Use ieee80211_anyhdrsize() to handle this better but make sure we do
at least have the first 2 octets needed for that.
While here move the safety checks before any code which may not obey
them later, just for good style.

The non-scanning check further down assumes a frame format also not
matching control frames. For now skip the checks for control frames
which allows us to deal with some of them at least now.

Sponsored by: The FreeBSD Foundation
Obtained from: 20210906 wireless v0.91 code drop
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D32238

Details

Provenance
bzAuthored on Sep 30 2021, 4:41 PM
Reviewer
adrian
Differential Revision
D32238: net80211: correct input_sta length checks and control frame handling
Parents
rG9a6695532b39: net80211/drivers: improve ieee80211_rx_stats for band
Branches
Unknown
Tags
Unknown