Bluetooth: Mesh: Fix NetKey Update behavior in Phase 1

If we get a different key value in Phase 1 we should return the same
"Cannot Update" error as in phases 2 and 3. This fixes test case
MESH/NODE/KR/BI-02-C.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-24 22:34:18 +02:00 committed by Johan Hedberg
commit d0826f3392

View file

@ -1989,7 +1989,7 @@ static void net_key_update(struct bt_mesh_model *model,
send_net_key_status(model, ctx, idx, STATUS_SUCCESS); send_net_key_status(model, ctx, idx, STATUS_SUCCESS);
return; return;
} }
break; /* fall through */
case BT_MESH_KR_PHASE_2: case BT_MESH_KR_PHASE_2:
case BT_MESH_KR_PHASE_3: case BT_MESH_KR_PHASE_3:
send_net_key_status(model, ctx, idx, STATUS_CANNOT_UPDATE); send_net_key_status(model, ctx, idx, STATUS_CANNOT_UPDATE);