turn: Allow alternate server error with no valid credentials
authorOlivier Crête <olivier.crete@collabora.com>
Tue, 22 Jan 2019 23:46:55 +0000 (18:46 -0500)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 23 Jan 2019 17:10:46 +0000 (12:10 -0500)
coturn doesn't authenticate us before sending us to an alternate server.

stun/stunagent.c

index f754322..26adb9f 100644 (file)
@@ -222,7 +222,8 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
           STUN_MESSAGE_RETURN_SUCCESS &&
        (error_code == STUN_ERROR_BAD_REQUEST ||
            error_code == STUN_ERROR_UNAUTHORIZED ||
-           error_code == STUN_ERROR_STALE_NONCE)) ||
+           error_code == STUN_ERROR_STALE_NONCE ||
+           error_code == STUN_ERROR_TRY_ALTERNATE)) ||
       (stun_message_get_class (msg) == STUN_INDICATION &&
           (agent->usage_flags & STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS ||
               agent->usage_flags & STUN_AGENT_USAGE_NO_INDICATION_AUTH));