Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: webrtc/p2p/base/dtlstransportchannel_unittest.cc

Issue 2970883005: Handle case where UDP packet contains multiple DTLS records. (Closed)
Patch Set: Feedback from Taylor. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/fakeicetransport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
index 4286d76be33bc37a9b7f694f31b93f79b348e64b..a8ac98775cc4a92c96bb08f961f6f77ab350257c 100644
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
@@ -670,6 +670,22 @@ TEST_F(DtlsTransportChannelTest, TestTransferDtlsTwoChannels) {
TestTransfer(1, 1000, 100, false);
}
+// Connect with DTLS, combine multiple DTLS records into one packet.
+// Our DTLS implementation doesn't do this, but other implementations may;
+// see https://tools.ietf.org/html/rfc6347#section-4.1.1.
+// This has caused interoperability problems with ORTCLib in the past.
+TEST_F(DtlsTransportChannelTest, TestTransferDtlsCombineRecords) {
+ PrepareDtls(true, true, rtc::KT_DEFAULT);
+ ASSERT_TRUE(Connect());
+ // Our DTLS implementation always sends one record per packet, so to simulate
+ // an endpoint that sends multiple records per packet, we configure the fake
+ // ICE transport to combine every two consecutive packets into a single
+ // packet.
+ cricket::FakeIceTransport* transport = client1_.GetFakeIceTransort(0);
+ transport->combine_outgoing_packets(true);
+ TestTransfer(0, 500, 100, false);
+}
+
// Connect with A doing DTLS and B not, and transfer some data.
TEST_F(DtlsTransportChannelTest, TestTransferDtlsRejected) {
PrepareDtls(true, false, rtc::KT_DEFAULT);
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/fakeicetransport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698