-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
V1.0group messagingspecMismatch between spec and implementationMismatch between spec and implementation
Description
In TC-G-2.2:
In the pre-requisite steps to the TC
ubuntu@ubuntu:~/apps$ ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0
will fail, even though the spec says
The length of the <<ref_GroupKeyMap>> and <<ref_GroupTable>> list attributes SHALL NOT exceed the value of the
MaxGroupsPerFabric
attribute multiplied by the number of <<ref_SupportedFabricsAttribute,supported fabrics>>.
The code has:
GroupDataProvider(uint16_t maxGroupsPerFabric = CHIP_CONFIG_MAX_GROUPS_PER_FABRIC,
uint16_t maxGroupKeysPerFabric = CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC) :
mMaxGroupsPerFabric(maxGroupsPerFabric),
mMaxGroupKeysPerFabric(maxGroupKeysPerFabric)
{}
There, CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC = 2
The check has:
// Insert last
VerifyOrReturnError(fabric.map_count == index, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(fabric.map_count < mMaxGroupKeysPerFabric, CHIP_ERROR_INVALID_LIST_LENGTH);
Proposed Solution
VerifyOrReturnError(fabric.map_count < mMaxGroupsPerFabric, CHIP_ERROR_INVALID_LIST_LENGTH);
Metadata
Metadata
Assignees
Labels
V1.0group messagingspecMismatch between spec and implementationMismatch between spec and implementation