[gnutls-help] DTLS and retransmission and reordering

Nikos Mavrogiannopoulos nmav at gnutls.org
Wed Apr 10 09:48:29 CEST 2013


On Tue, Apr 9, 2013 at 10:02 PM, Joke de Buhr <joke at seiken.de> wrote:

> hi,
>
> i'm not use but a have to questions regarding the dtls implementation.
>
> first of all i'm using the multiple threads and every thread can receive
> packets from the udp socket. each thread calls the receive() and the
> packet is
> copied into the correct gnutls of the correct session.
>
> if i'm using only one thread it's more or less guarantied gnutls receives
> the
> data in the correct order. reodering of udp packets is still possible
> though.
> everything works fine and the handshake completes.
>
> but if the packet are received out of order gnutls doesn't seem to write
> all
> the outgoing packet. check the log "Discarded duplicate message[0]:
> Handshake”.
>

That is because you are re-arranging the messages in a way for encrypted
messages (i.e., the finished packet) is received before the handshake is
complete. That packet is dropped because the sliding window code detects it
as duplicate (its sequence number is the same as the first handshake
message sequence number). So if you receive the Finished message before the
handshake is complete you should rely on retransmission to receive it
again. Doesn't retransmission work in your case?

regards,
Nikos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20130410/2eb0f29f/attachment-0001.html>


More information about the Gnutls-help mailing list