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:
parent
2ec8f0e17d
commit
a867076c3e
@ -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
|
* The OS Version component indicates what operating system is running
|
||||||
* on the device. It is a four-byte field. The most significant bit is
|
* on the device. It is a four-byte field. The most significant bit is
|
||||||
* reserved and always set to one.
|
* 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;
|
*out = v & 0x7fffffff;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user