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

Fix panic in Rtc::accepts() with STUN traffic #461

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

OxleyS
Copy link
Contributor

@OxleyS OxleyS commented Feb 19, 2024

Fixes #460

As a summary of that discussion, if you have two Rtc instances, one negotiated and the other not, and you pass incoming STUN traffic intended for the negotiated instance to the Rtc::accepts() of the non-negotiated instance, it will panic in stun_credentials because without an offer, no remote ICE credentials will have been sent. This PR simply checks for this case first.

…d for another instance, when the first instance has not negotiated
Copy link
Owner

@algesten algesten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@algesten algesten merged commit af9cc9a into algesten:main Feb 19, 2024
22 checks passed
@OxleyS OxleyS deleted the fix-accepts-ice-panic branch February 19, 2024 08:07
OxleyS added a commit to OxleyS/str0m that referenced this pull request Mar 19, 2024
This fixes a bug where STUN binding messages that would have been buffered prior to receiving an answer were instead dropped
algesten pushed a commit that referenced this pull request Mar 19, 2024
This fixes a bug where STUN binding messages that would have been buffered prior to receiving an answer were instead dropped
thomaseizinger pushed a commit to thomaseizinger/str0m that referenced this pull request Mar 21, 2024
This fixes a bug where STUN binding messages that would have been buffered prior to receiving an answer were instead dropped
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.

Panic in Rtc:accepts() caused by ICE code
2 participants