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

Remove checking remote description has different ICE credentials #1172

Merged
merged 3 commits into from
May 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Disable comparing local and remote iceUfrag and icePwd in validateRem…
…oteDescription.
xicilion committed May 10, 2024
commit e98dd3e2922c111a3eaa5c47f0e4350e1cca676f
9 changes: 5 additions & 4 deletions src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
@@ -858,10 +858,11 @@ void PeerConnection::validateRemoteDescription(const Description &description) {
if (activeMediaCount == 0)
throw std::invalid_argument("Remote description has no active media");

if (auto local = localDescription(); local && local->iceUfrag() && local->icePwd())
if (*description.iceUfrag() == *local->iceUfrag() &&
*description.icePwd() == *local->icePwd())
throw std::logic_error("Got the local description as remote description");
// In the WebRTC Direct protocol, we need to allow local and remote to use the same ufrag and pwd.
// if (auto local = localDescription(); local && local->iceUfrag() && local->icePwd())
// if (*description.iceUfrag() == *local->iceUfrag() &&
// *description.icePwd() == *local->icePwd())
// throw std::logic_error("Got the local description as remote description");

PLOG_VERBOSE << "Remote description looks valid";
}