[gnutls-help] DTLS and retransmission and reordering
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:
> 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
> data in the correct order. reodering of udp packets is still possible
> everything works fine and the handshake completes.
> but if the packet are received out of order gnutls doesn't seem to write
> the outgoing packet. check the log "Discarded duplicate message:
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnutls-help