Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop trying to commission devices that are not in commissioning mode. (
Browse files Browse the repository at this point in the history
…#13794)

SetUpCodePairer was filtering devices by discriminator, but not
checking for a nonzero CM value, so could end up trying to commission
a device that's not commissionable and miss a device with a colliding
discriminator that is.
bzbarsky-apple authored and pull[bot] committed Nov 14, 2023
1 parent 7dbade1 commit 3570867
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/controller/SetUpCodePairer.cpp
Original file line number Diff line number Diff line change
@@ -167,6 +167,11 @@ void SetUpCodePairer::OnDiscoveredDeviceOverBleError(void * appState, CHIP_ERROR

bool SetUpCodePairer::NodeMatchesCurrentFilter(const Dnssd::DiscoveredNodeData & nodeData)
{
if (nodeData.commissioningMode == 0)
{
return false;
}

switch (currentFilter.type)
{
case Dnssd::DiscoveryFilterType::kShortDiscriminator:

0 comments on commit 3570867

Please sign in to comment.