Repository navigation
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
Conversation
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.
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.