dtls icon indicating copy to clipboard operation
dtls copied to clipboard

HelloRequest Handshake Type Support

Open MaxBosse opened this issue 2 years ago • 1 comments

Summary

Add support for the HelloRequest Type

Motivation

I am currently trying to implement a client for a server that sends a HelloRequest-Paket after the HelloVerifyRequest. This packet is currently not supported and causes the client to not function properly.

Additional context

My understanding is that the HelloRequest Packet requests the client to reset its sequence number. However, the HelloRequest Paket already arrives with sequence number 0, causing the anti-replay protection to trigger, which happens before we try to parse the packet to receive its Handshake Type and therefore we never actually handle the paket, so implementing this feature would require some restructuring of the anti-replay protection/handshake parsing.

Here are 2 Screenshots showing the HelloRequest-Paket and the following ClientHello-Paket. The left window is a capture of the original client, the right window is the client using this package. HelloRequest ClientHello

Aswell as the Log-Message popping up: dtls DEBUG: 08:47:21.686082 conn.go:672: discarded duplicated packet (epoch: 0, seq: 0)

MaxBosse avatar May 04 '22 08:05 MaxBosse

Hey @MaxBosse

I think it makes sense to add support for it! Would you be interested in contributing this? I would be happy to help.

In the short/medium time I don't have the time to work on this. I could see it possibly happening in the next 6 months. We just have lots of other issues that have more users requesting/effected.

thanks

Sean-Der avatar May 08 '22 03:05 Sean-Der