Open VPBalaRama opened 4 years ago
When using the stateless cookie exchange method, it is required that openssl sends the client Hello as one single Packet (it will be split by the IP-Layer if needed, that is expected). To accomplish that you can use the set_mtu
method of the dtls socket (client side) to set the MTU to a size bigger than the expected Handshake Packet. The MTU set here actually does not matter after the handshake as every send
/ async_send
corresponds to one UDP Packet, so the application has to match the MTU when sending anyway.
I guess a
socket.set_mtu(60000); // Check that this is big enough
on the client side before the handshake should fix your problem.
Hi I have attached the screenshot of the DTLS Handshake pcap. Here my client certificate of length 3100+ bytes is fragmented to smaller chunks of 1500 bytes(MTU size) and written into the socket. While writing into the network, all packets(fragmented chunks) are accumulated into a single datagram.
And Handshake is failing with error new fragment overlaps the older data.
Please let me know to how to disable the accumulation of multiple packets in to single datagram. i couldn't find the UDP_CORK option here.
hello,can you give me a DTLS demo use ASIO library and send code to my e-mail:943865390@qq.com,Thanks.
Hi I have attached the screenshot of the DTLS Handshake pcap. Here my client certificate of length 3100+ bytes is fragmented to smaller chunks of 1500 bytes(MTU size) and written into the socket. While writing into the network, all packets(fragmented chunks) are accumulated into a single datagram.
And Handshake is failing with error new fragment overlaps the older data.
Please let me know to how to disable the accumulation of multiple packets in to single datagram. i couldn't find the UDP_CORK option here.![Capture](https://user-images.githubusercontent.com/28774228/84837228-33de1300-affd-11ea-8267-1f01456ba41e.JPG)