-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PairingSession::GetSessionType returns incorrect result #13711
Labels
Comments
@emargolis is it as simple as Clear should not reset the session type, since that shouldn't change? |
@mlepage-google I agree with your assessment that Clear() shouldn't reset the session type. It is fixed in #13772 |
Thank you! |
tcarmelveilleux
added a commit
to tcarmelveilleux/connectedhomeip
that referenced
this issue
Apr 13, 2022
- With Issue project-chip#13711, it was assumed only PASE sessions needed to adopt FabricIndex of new fabric after AddNOC. This was incorrect, since AddNOC is legal over CASE. There was a TODO left. This PR: - Removes the TODO and associated incorrect comment - Renames "NewFabric" to "AdoptFabricIndex" in SecureSession - Cleans-up some logging in NOC cluster and FabricTable that was found while doing this work Issue project-chip#13711 Testing done: - All cert tests still pass - Unit tests pass - It's not possible to do a full commissioning over CASE yet with YAML so I can't make a YAML test case, the code delta on logic is such that by inspection it would do the right thing.
tcarmelveilleux
added a commit
to tcarmelveilleux/connectedhomeip
that referenced
this issue
Apr 13, 2022
- With Issue project-chip#13711, it was assumed only PASE sessions needed to adopt FabricIndex of new fabric after AddNOC, but the door was left open until project-chip#13711 was fixed. It is now fixed so the TODO is gone and PASE-only is enforced. This PR: - Removes the TODO and associated comment, and enforces PASE - Renames "NewFabric" to "AdoptFabricIndex" in SecureSession - Cleans-up some logging in NOC cluster and FabricTable that was found while doing this work Issue project-chip#13711 Testing done: - All cert tests still pass - Unit tests pass - It's not possible to do a full commissioning over CASE yet with YAML so I can't make a YAML test case, the code delta on logic is such that by inspection it would do the right thing.
tcarmelveilleux
added a commit
that referenced
this issue
Apr 14, 2022
- With Issue #13711, it was assumed only PASE sessions needed to adopt FabricIndex of new fabric after AddNOC, but the door was left open until #13711 was fixed. It is now fixed so the TODO is gone and PASE-only is enforced. This PR: - Removes the TODO and associated comment, and enforces PASE - Renames "NewFabric" to "AdoptFabricIndex" in SecureSession - Cleans-up some logging in NOC cluster and FabricTable that was found while doing this work Issue #13711 Testing done: - All cert tests still pass - Unit tests pass - It's not possible to do a full commissioning over CASE yet with YAML so I can't make a YAML test case, the code delta on logic is such that by inspection it would do the right thing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
During commissioning, by the time SessionManager::NewPairing (in SessionManager.cpp)
calls PairingSession::GetSessionType to pass it into SecureSessionTable::CreateNewSecureSession,
the value is not set.
You can see this by logging the value and the PairingSession pointer at that location, it's 0 (undefined), not 1 (PASE) or 2 (CASE).
You can add more logging of that value and this pointer in places (e.g. PairingSession::SetSecureSessionType, called by PASESession constructor) to see it was set.
Adding logging of that value and this pointer in PairingSession::Clear reveals it is cleared multiple times between being set and being read, so this is probably why it's not returning the correct result when finally used.
Proposed Solution
Need to determine what the value is used for, whether it matters that it becomes unset, why Clear is called so frequently, etc.
The text was updated successfully, but these errors were encountered: