Skip to content

[SVE2][TC-G-2.2]Group Key map #22236

@chrisbeach59

Description

@chrisbeach59

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

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions