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

Unified Diff: webrtc/base/opensslstreamadapter.cc

Issue 1174483002: Set mtu for DTLS to 1280 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/opensslstreamadapter.cc
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index e12940fbeb90bad6384ed9aa78be7ab2188808ea..51921f143153a171b3573edabd571f265fc9fe22 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -260,6 +260,12 @@ static long stream_ctrl(BIO* b, int cmd, long num, void* ptr) {
return 0;
case BIO_CTRL_FLUSH:
return 1;
+ case BIO_CTRL_DGRAM_QUERY_MTU:
+ // openssl defaults to mtu=256 unless we return something here.
+ // The handshake doesn't actually need to send packets above 1k,
+ // so this seems like a sensible value that should work in most cases.
+ // Webrtc uses the same value for video packets.
+ return 1200;
default:
return 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698