connectedhomeip
connectedhomeip copied to clipboard
Subscription id handling in interaction model is pretty broken
Problem
Subscription ids are assigned by the server and are scoped to that server. That means that two different subscriptions can have the same id on the client, if they are targeting different servers. So subscription id is not a unique identifier on the client.
Given that, we use subscription ids on the client in the following broken ways:
-
InteractionModelEngine::ShutdownSubscription
uses the subscription id as a unique key to shut down a specific subscription. I don't know how to fix this one. -
InteractionModelEngine::OnUnsolicitedReportData
uses the subscription id as a unique key to find the right ReadClient. At least for this one we could easily check the fabric index and node id of the peer....
The spec-related problem has been fixed in #21771 so I'm going to remove that label. The remaining issue is limited to ShutdownSubscription
, of which there is only one consumer, i.e chip-tool command.
I'm not sure if there are any cert tests that rely on this command. If they do, we should attach the "cert blocker" on this.