Native ICE TURN failover fails when the servers use different credentials
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- C++
- Star
- 10k
- Fork
- 750
- Merge trung bình
- 5 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ValveSoftware/GameNetworkingSockets
-
Native ICE resolves STUN/TURN hostnames under the global lockCó thể đã có người làm @tintinhamans đã nhận 15 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
WebRTC ICE keeps an idle thread per STUN/TURN hostname lookupCó thể đã có người làm @tintinhamans đã nhận 15 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
ValveSoftware/GameNetworkingSockets#439 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
ValveSoftware/GameNetworkingSockets#425 · 7 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
steamworks
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
ValveSoftware/GameNetworkingSockets#386 · 2 bình luận ·
Tất cả issue của ValveSoftware/GameNetworkingSockets
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mesonbuild/wrapdb#2961 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
80 Instance - Raid - Northrend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
azerothcore/azerothcore-wotlk#28075 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
objectionary/eo-graphs#80 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
scanaislop/aislop#476 ·
Maintainer thường phản hồi trong vòng 1 ngày