Mark
Mark

Reputation: 6464

minimum size of DTLS message

I've been reading the specs, rfc4346 and rfc4347, however I don't see any of those mentions about the minimal size of DTLS records, i.e. in this case UDP payload size.

Are there any requirements from DTLS/TLS perspective that determine size? Given that DTLS header is fixed and has pre-defined length, what about the records, which could be handshake or application data?

Thanks.

Upvotes: 1

Views: 2247

Answers (1)

Praveen Kariyanahalli
Praveen Kariyanahalli

Reputation: 11

DTLS provides its own fragmentation mechanism for the handshake messages, it takes care of reordered packets too (has a frag offset/len fields in the handshake message header). This helps the dtls send packets greater than the PMTU size (typically certificate messages). For the application data you can rely kernel to do fragment the packets and reassemble them. If you want to turn off the inbuilt fragmentation you could use the following:

SSL_CTX_set_options(ctx, SSL_OP_NO_QUERY_MTU);

Then you could set a set a huge mtu value in your ssl

SSL_set_mtu(ssl, <big_value_here>);

That way you make your kernel handle the fragmentation and reassembly.

Upvotes: 1

Related Questions