Bug 1558524 - Fix handling of incoming mDNS candidates; r=bwc

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dan Minor 2019-06-12 17:21:15 +00:00
Родитель 861987223e
Коммит f1e1443538
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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) {
@ -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: "