mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
ie: fix incorrect length check for hotspot indication
The length check was incorrectly assuming that PPS MO ID or ANQP Domain ID would be present in the IE. Both these are optional and without then the minimum length is 5 bytes, not 7.
This commit is contained in:
parent
993d9cbf6b
commit
8bcb8e870e
2
src/ie.c
2
src/ie.c
@ -1287,7 +1287,7 @@ bool is_ie_wfa_ie(const uint8_t *data, uint8_t len, uint8_t oi_type)
|
|||||||
|
|
||||||
if (oi_type == IE_WFA_OI_OSEN && len < 22)
|
if (oi_type == IE_WFA_OI_OSEN && len < 22)
|
||||||
return false;
|
return false;
|
||||||
else if (oi_type == IE_WFA_OI_HS20_INDICATION && len < 7)
|
else if (oi_type == IE_WFA_OI_HS20_INDICATION && len < 5)
|
||||||
return false;
|
return false;
|
||||||
else if (len < 4) /* OI not handled, but at least check length */
|
else if (len < 4) /* OI not handled, but at least check length */
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user