Bluetooth: Mesh: Permit kr phase 0x00 to 0x03
MESH/NODE/KR/BI-01-C Permit kr phase 0x00-->0x03 Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
parent
3d55080bf3
commit
fe7eda6ac8
1 changed files with 5 additions and 1 deletions
|
@ -82,6 +82,10 @@ static void key_refresh(struct bt_mesh_subnet *sub, uint8_t new_phase)
|
|||
break;
|
||||
/* Revoking keys */
|
||||
case BT_MESH_KR_PHASE_3:
|
||||
if (sub->kr_phase == BT_MESH_KR_NORMAL) {
|
||||
return;
|
||||
}
|
||||
__fallthrough;
|
||||
case BT_MESH_KR_NORMAL:
|
||||
sub->kr_phase = BT_MESH_KR_NORMAL;
|
||||
memcpy(&sub->keys[0], &sub->keys[1], sizeof(sub->keys[0]));
|
||||
|
@ -330,7 +334,7 @@ uint8_t bt_mesh_subnet_kr_phase_set(uint16_t net_idx, uint8_t *phase)
|
|||
{
|
||||
/* Table in Bluetooth Mesh Profile Specification Section 4.2.14: */
|
||||
const uint8_t valid_transitions[] = {
|
||||
0x00, /* Normal phase: KR is started by key update */
|
||||
BIT(BT_MESH_KR_PHASE_3), /* Normal phase: KR is started by key update */
|
||||
BIT(BT_MESH_KR_PHASE_2) | BIT(BT_MESH_KR_PHASE_3), /* Phase 1 */
|
||||
BIT(BT_MESH_KR_PHASE_3), /* Phase 2 */
|
||||
/* Subnet is never in Phase 3 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue