Bluetooth: Mesh: Fix ignoring invalid Transport OpCode as LPN
MESH/NODE/FRND/LPN/BI-02-C requires us to ignore unknown Transport OpCodes instead of treating them as valid responses to a Friend Poll. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
f51797335d
commit
ada5771d7c
1 changed files with 5 additions and 1 deletions
|
@ -1267,8 +1267,12 @@ int bt_mesh_trans_recv(struct net_buf_simple *buf, struct bt_mesh_net_rx *rx)
|
|||
* bt_mesh_lpn_waiting_update() function will return false:
|
||||
* we still need to go through the actual sending to the bearer and
|
||||
* wait for ReceiveDelay before transitioning to WAIT_UPDATE state.
|
||||
*
|
||||
* ENOENT is a special condition that's only used to indicate that
|
||||
* the Transport OpCode was invalid, in which case we should ignore
|
||||
* the PDU completely, as per MESH/NODE/FRND/LPN/BI-02-C.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) &&
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) && err != -ENOENT &&
|
||||
bt_mesh_lpn_established() && bt_mesh_lpn_waiting_update()) {
|
||||
bt_mesh_lpn_msg_received(rx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue