Set mtu for DTLS to 1280

Set mtu for DTLS to 1280, otherwise it defaults to 256 in recent
versions of openssl.

R=juberti@webrtc.org

Review URL: https://codereview.webrtc.org/1174483002.

Cr-Commit-Position: refs/heads/master@{#9407}
This commit is contained in:
Henrik Lundin 2015-06-10 09:45:58 +02:00
parent 2a10087d5e
commit f4baca50bb

View File

@ -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;
}