3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 11:52:34 +01:00

wscutil: Relax OS_VERSION parser

Apple implementations seem to not set the MSB bit to 1.
This commit is contained in:
Denis Kenzior 2016-08-18 16:48:13 -05:00
parent 2ec8f0e17d
commit a867076c3e

View File

@ -356,10 +356,10 @@ static bool extract_os_version(struct wsc_attr_iter *iter, void *data)
* The OS Version component indicates what operating system is running
* on the device. It is a four-byte field. The most significant bit is
* reserved and always set to one.
*
* We do not strictly check this as at least Apple's WPS implementation
* does not set the MSB to 1.
*/
if ((v & 0x80000000) == 0)
return false;
*out = v & 0x7fffffff;
return true;
}