Native ICE TURN failover fails when the servers use different credentials
@PerryLink ya está trabajando en esto.
Desde el 9/10/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- networking
Línea de trabajo
Start at STUNRequestCallback_AllocateRelay in src/ice.cpp and trace where m_strTURNRealm, m_strTURNNonce and m_arrTURNKey are set during the 401 challenge and read when building the next Allocate. First fix is resetting those members before advancing to the next server; done means a second TURN server with different realm/credentials is reached with its own key after the first times out. Then evaluate the second part of the report: whether non-timeout error responses should also advance the server list instead of marking relay failed, and check existing TURN/ICE tests or a two-server repro for coverage.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I think I found a problem with TURN failover in the native ICE client.
If the first TURN server answers the Allocate with a 401 and then stops responding, the client times out and moves on to the second server. But it seems to keep the realm, nonce and key from the first server (m_strTURNRealm, m_strTURNNonce, m_arrTURNKey), so the request to the second server has the right username but the wrong realm and key. The second server answers 401, the client treats that as wrong credentials, and relay is marked as failed.
To reproduce, configure two TURN servers with different credentials or realms, where the first one answers the initial 401 challenge but drops the authenticated Allocate. With peers that can only connect through a relay, the connection fails. If the first server never answers at all, failover works fine.
Clearing m_strTURNRealm and m_strTURNNonce before trying the next server in STUNRequestCallback_AllocateRelay fixed it for me.
Related: the second server is only tried after a timeout. If the first server rejects the request, for example because of a wrong password, relay is marked as failed and the second server is never contacted. That means a backup server only helps when the first one is down, not when it is up and refusing us. Shouldn't an error response also fall through to the next server?
- Lenguaje dominante
- C++
- Estrellas
- 10k
- Forks
- 750
- Merge medio
- 5 d 19 h
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ValveSoftware/GameNetworkingSockets
-
Native ICE resolves STUN/TURN hostnames under the global lockPosiblemente ocupada @tintinhamans la tomó hace 19 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
WebRTC ICE keeps an idle thread per STUN/TURN hostname lookupPosiblemente ocupada @tintinhamans la tomó hace 19 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
ValveSoftware/GameNetworkingSockets#439 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
ValveSoftware/GameNetworkingSockets#425 · 7 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
-
steamworks
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
ValveSoftware/GameNetworkingSockets#386 · 2 comentarios ·
Todos los issues de ValveSoftware/GameNetworkingSockets
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
`IO.FS.realPath` reports every failure as `noFileOrDirectory` instead of classifying by `errno`Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
leanprover/lean4#15683 ·
Los mantenedores suelen responder en 1 día
-
[Bug] [geo] Haversine distance calculation can return NaN for antipodal coordinatesPosiblemente ocupada @516665061 la tomó hoy. Abiertostatus:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PX4/PX4-Autopilot#29211 ·
Los mantenedores suelen responder en 1 día
-
llvm.memcpy with destination align but no source align asserts "Missed Source alignment!"Posiblemente ocupada @pvelesko la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
KhronosGroup/SPIRV-LLVM-Translator#4093 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día