Repository navigation
ice: Reset TURN auth state when failing over to next server - #447
Closed
sashakosti wants to merge 1 commit into
Closed
sashakosti wants to merge 1 commit into
sashakosti wants to merge 1 commit into
Conversation
When a TURN allocate request times out, STUNRequestCallback_AllocateRelay attempts to fail over to the next server in m_vecTURNServers. However, m_strTURNRealm, m_strTURNNonce, and m_arrTURNKey were retained from the previous server. This caused QueueTURNRequest to immediately send an authenticated Allocate to the new server using the previous server's realm and nonce, leading to authentication rejection and premature relay failure. Reset m_strTURNRealm, m_strTURNNonce, and m_arrTURNKey before queueing the request on the next TURN server to ensure a clean handshake. Fixes ValveSoftware#445
Author
|
Closing in favor of #446 which addressed this issue first. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a TURN allocate request times out,
STUNRequestCallback_AllocateRelayattempts to fail over to the next server inm_vecTURNServers. However,m_strTURNRealm,m_strTURNNonce, andm_arrTURNKeywere retained from the previous server.This caused
QueueTURNRequestto treat the new request as already challenged, immediately attaching the previous server's realm, nonce, and MD5 key. The new server would reject the request (typically with 401), causing relay discovery to fail prematurely.Resetting
m_strTURNRealm,m_strTURNNonce, andm_arrTURNKeybefore queueing the request on the next TURN server ensures a clean handshake adhering to RFC 5766 and restoring the documented invariant inICESessionInterface("m_strTURNRealm is empty until then").Fixes #445