Skip to content

STUN and TURN failovers and keepalive should only look for the same address family - #462

Open
Ibn-Butt-Toota wants to merge 3 commits into
ValveSoftware:masterfrom
Ibn-Butt-Toota:butt/fix-ice-stun-turn-family-server-failover-and-keepalive
Open

Ibn-Butt-Toota wants to merge 3 commits into
ValveSoftware:masterfrom
Ibn-Butt-Toota:butt/fix-ice-stun-turn-family-server-failover-and-keepalive

Conversation

@Ibn-Butt-Toota

Copy link
Copy Markdown

Each socket that the ICE client belongs to either IPv4 or IPv6. When the ICE client picks a server for a socket, it's supposed to take the first entry of the matching family. But right now it just goes through the entire list of possible servers, without checking the family. At first that isn't an issue because an ipv4 socket would just reject an ipv6 server candidate, but that results in the OS rejecting the attempt immediately, at which point the next server in the list is tried (or the list is now empty and there is no server left to pick).

I found that this bug actually happened both in STUN and TURN, so I wrote tests for them and also added ++TEST_ICE_ctr_srflx_send; so I could confirm that without the fix, my tests would fail with it being 2 instead of 1.

And then I also found that the keepalive in STUN had this issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant