commit a833f146272555668c30cfb492ba9a6d5bc3babe
parent 3fc35429f23544b11db6ddfc8c4cd2432b394b25
Author: Michael Froman <mfroman@mozilla.com>
Date: Wed, 8 Oct 2025 18:35:58 -0500
Bug 1993083 - Vendor libwebrtc from 74e224e0d9
Upstream commit: https://webrtc.googlesource.com/src/+/74e224e0d9780aed8534f22e2d2553682f9cd6d4
sdp munging: detect munging trickle ice-options
in particular removing it which should have no effect.
Bug: chromium:40567530
Change-Id: I247e3723e3fbe028426fe44ce3b13d90318abde1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/396843
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45069}
Diffstat:
4 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-08T23:34:44.891122+00:00.
+libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-08T23:35:49.245602+00:00.
# base of lastest vendoring
-ad87fa2721
+74e224e0d9
diff --git a/third_party/libwebrtc/api/uma_metrics.h b/third_party/libwebrtc/api/uma_metrics.h
@@ -197,6 +197,7 @@ enum SdpMungingType {
kIceOptionsRenomination = 28,
kDirection = 29,
kRtcpMux = 30,
+ kIceOptionsTrickle = 31,
// RTP header extension munging.
kRtpHeaderExtensionRemoved = 40,
kRtpHeaderExtensionAdded = 41,
diff --git a/third_party/libwebrtc/pc/sdp_munging_detector.cc b/third_party/libwebrtc/pc/sdp_munging_detector.cc
@@ -86,6 +86,18 @@ SdpMungingType DetermineTransportModification(
if (!created_renomination && set_renomination) {
return SdpMungingType::kIceOptionsRenomination;
}
+ bool created_trickle =
+ absl::c_find(
+ last_created_transport_infos[i].description.transport_options,
+ ICE_OPTION_TRICKLE) !=
+ last_created_transport_infos[i].description.transport_options.end();
+ bool set_trickle =
+ absl::c_find(transport_infos_to_set[i].description.transport_options,
+ ICE_OPTION_TRICKLE) !=
+ transport_infos_to_set[i].description.transport_options.end();
+ if (created_trickle && !set_trickle) {
+ return SdpMungingType::kIceOptionsTrickle;
+ }
return SdpMungingType::kIceOptions;
}
}
diff --git a/third_party/libwebrtc/pc/sdp_munging_detector_unittest.cc b/third_party/libwebrtc/pc/sdp_munging_detector_unittest.cc
@@ -73,6 +73,7 @@
namespace webrtc {
+using ::testing::ElementsAre;
using ::testing::Eq;
using ::testing::IsTrue;
using ::testing::Pair;
@@ -631,6 +632,8 @@ TEST_F(SdpMungingTest, IceOptionsRenomination) {
auto offer = pc->CreateOffer();
auto& transport_infos = offer->description()->transport_infos();
ASSERT_EQ(transport_infos.size(), 1u);
+ ASSERT_THAT(transport_infos[0].description.transport_options,
+ ElementsAre("trickle"));
transport_infos[0].description.transport_options.push_back(
ICE_OPTION_RENOMINATION);
RTCError error;
@@ -640,6 +643,24 @@ TEST_F(SdpMungingTest, IceOptionsRenomination) {
ElementsAre(Pair(SdpMungingType::kIceOptionsRenomination, 1)));
}
+TEST_F(SdpMungingTest, IceOptionsTrickle) {
+ auto pc = CreatePeerConnection();
+ pc->AddAudioTrack("audio_track", {});
+
+ auto offer = pc->CreateOffer();
+ auto& transport_infos = offer->description()->transport_infos();
+ ASSERT_EQ(transport_infos.size(), 1u);
+ ASSERT_THAT(transport_infos[0].description.transport_options,
+ ElementsAre("trickle"));
+ transport_infos[0].description.transport_options.clear();
+
+ RTCError error;
+ EXPECT_TRUE(pc->SetLocalDescription(std::move(offer), &error));
+ EXPECT_THAT(
+ metrics::Samples("WebRTC.PeerConnection.SdpMunging.Offer.Initial"),
+ ElementsAre(Pair(SdpMungingType::kIceOptionsTrickle, 1)));
+}
+
TEST_F(SdpMungingTest, DtlsRole) {
auto pc = CreatePeerConnection();
pc->AddAudioTrack("audio_track", {});