Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if IPv6 is disabled to avoid failure when creating forwarder socket (fixes #2915) #2916

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

lminiero
Copy link
Member

@lminiero lminiero commented Mar 7, 2022

As explained in #2915, if IPv6 is disabled (e.g., via kernel), creating IPv6 sockets will fail. This is a problem with RTP forwarders in the AudioBridge and VideoRoom, since we always create an IPv6 socket to send to both IPv4 and IPv6 (a single socket is created per publisher, which means the same socket can send to different families). As a result, forwarders will always fail in a system with those constraints.

This patch tries to address the problem by making a check when the plugin is started: we try and create a socket like the one we'd use for forwarders, and if that fails, we consider IPv6 unavailable. As a result, in that case we only create IPv4 sockets, and return an error if there's an attempt to forward to an IPv6 address.

I tested this briefly and it seems to work as expected, but of course you may want to make sure this doesn't break anything for you, especially if you use forwarders a lot. Notice that this PR is on master, but when this is merged I'll make sure to backport the changes to 0.x as well.

@lminiero
Copy link
Member Author

lminiero commented Apr 1, 2022

Merging.

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