Bluetooth: Mesh: Fix ignoring all prohibited sub_dst in HB Sub Set
Section 4.2.18.2 in the Mesh Profile Specification states: "The Heartbeat Subscription Destination shall be the unassigned address, the primary unicast address of the node, or a group address, all other values are Prohibited." Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
6047ccd2a1
commit
ebf1a3c661
1 changed files with 3 additions and 1 deletions
|
@ -2820,7 +2820,9 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
|
|||
return;
|
||||
}
|
||||
|
||||
if (BT_MESH_ADDR_IS_VIRTUAL(sub_dst)) {
|
||||
if (BT_MESH_ADDR_IS_VIRTUAL(sub_dst) || BT_MESH_ADDR_IS_RFU(sub_dst) ||
|
||||
(BT_MESH_ADDR_IS_UNICAST(sub_dst) &&
|
||||
sub_dst != bt_mesh_primary_addr())) {
|
||||
BT_WARN("Prohibited destination address");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue