Bluetooth: Fix advertising instance validity check for flags
Flags are not allowed in Scan Response. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
2bb36870e8
commit
9c9db78dc0
|
@ -6065,7 +6065,8 @@ static bool tlv_data_is_valid(u32 adv_flags, u8 *data, u8 len, bool is_adv_data)
|
|||
for (i = 0, cur_len = 0; i < len; i += (cur_len + 1)) {
|
||||
cur_len = data[i];
|
||||
|
||||
if (data[i + 1] == EIR_FLAGS && flags_managed(adv_flags))
|
||||
if (data[i + 1] == EIR_FLAGS &&
|
||||
(!is_adv_data || flags_managed(adv_flags)))
|
||||
return false;
|
||||
|
||||
if (data[i + 1] == EIR_TX_POWER && tx_power_managed(adv_flags))
|
||||
|
|
Loading…
Reference in New Issue