]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
net80211: improve error checking in ieee80211_parse_{wpa,rsn}()
authoravos <avos@FreeBSD.org>
Tue, 13 Sep 2016 22:59:38 +0000 (22:59 +0000)
committeravos <avos@FreeBSD.org>
Tue, 13 Sep 2016 22:59:38 +0000 (22:59 +0000)
commit6271fc4195db5e91b27500aba687971b538caee3
treef0a2ebe89a3d501be40327acef5baa18fb205f66
parenta4b641b28ded3fc529734a06bdbe0c0ebb5fc433
net80211: improve error checking in ieee80211_parse_{wpa,rsn}()

- Add few checks for group/pairwise ciphers into
ieee80211_parse_{wpa,rsn}().
- Split error code and cipher value in wpa_cipher() / rsn_cipher(); current
hack with (1 << 32) does not work - it's 1, not 0 (detected by CSA).
- Return IEEE80211_REASON_UNSUPP_RSN_IE_VERSION instead of
IEEE80211_REASON_IE_INVALID when version field is not equal to RSN_VERSION.

Tested with wpi(4) / urtwn(4) (HOSTAP mode).

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7887
sys/net80211/ieee80211_hostap.c