-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CASEServer cleanup to not nuke unrelated CASE handshakes.
We could run into a problem when an invalid Sigma1 (e.g. not matching any fabric) was received, because we would do the following: 1) Call CASEServer::OnSessionEstablishmentError from inside CASESession::OnMessageReceived, which would queue a task to blow away the CASEServer state and start listening for new CASE handshakes (PrepareForSessionEstablishment). 2) Return an error from CASESession::OnMessageReceived, which would cause us to synchronously do call PrepareForSessionEstablishment. If we now got a new Sigma1 before the async task ran (e.g. if it was already waiting in the queue), we could respond to the Sigma1 with Sigma2Resume, then the async task would run and blow away our state. We would end up in a situation where the other side then sends a StatusResponse and thinks CASE is established, but on our end we don't recognize the session ID for the session they think has been established. The fix is to restrict the async behavior to the one case it's actually needed (OnSessionReleased), for both CASE and PASE, to synchronously call PrepareForSessionEstablishment from OnSessionEstablishmentError, and to remove the now-redundant PrepareForSessionEstablishment call on error return from CASESession::OnMessageReceived.
- Loading branch information
1 parent
bbf3111
commit b17b1a5
Showing
6 changed files
with
39 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters