Skip to content

Commit

Permalink
Disable comparing local and remote iceUfrag and icePwd in validateRem…
Browse files Browse the repository at this point in the history
…oteDescription.
  • Loading branch information
xicilion committed May 10, 2024
1 parent 919f06e commit e98dd3e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit e98dd3e

Please sign in to comment.