Skip to content

Commit

Permalink
Bug 1558524 - Fix handling of incoming mDNS candidates; r=bwc
Browse files Browse the repository at this point in the history
This must have been broken while addressing review comments in Bug 1548841,
the first commit has it right and the last commit in the series breaks it.
Since we don't yet generate mDNS addresses in Firefox, the unit tests would not
catch this problem, and interoperability with other browsers would continue to
work due to peer reflex candidates.

We will have test coverage for this once we land generating our own mDNS
candidates. ICE will fail in the mochitests if we don't support resolving
mDNS addresses properly, which is how I discovered this bug.

Differential Revision: https://phabricator.services.mozilla.com/D34579
  • Loading branch information
dminor committed Jun 12, 2019
1 parent 63517c7 commit 6868196
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,7 @@ nsresult MediaTransportHandlerSTS::DNSListener::OnLookupComplete(
mTransportId.c_str(), mCandidate.c_str(), buf);

// Replace obfuscated address with actual address
std::string obfuscatedAddr = mTokenizedCandidate[4];
mTokenizedCandidate[4] = buf;
std::ostringstream o;
for (size_t i = 0; i < mTokenizedCandidate.size(); ++i) {
Expand All @@ -1412,7 +1413,8 @@ nsresult MediaTransportHandlerSTS::DNSListener::OnLookupComplete(
return NS_OK;
}

nsresult rv = stream->ParseTrickleCandidate(mCandidate, mUfrag, "");
nsresult rv = stream->ParseTrickleCandidate(mungedCandidate, mUfrag,
obfuscatedAddr);
if (NS_FAILED(rv)) {
CSFLogError(LOGTAG,
"Couldn't process ICE candidate with transport id %s: "
Expand Down

0 comments on commit 6868196

Please sign in to comment.