From 257df40f00cb487eee05d17b62d7d5b36908ecd2 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 8 Aug 2013 13:28:55 +0100 Subject: DTLS handshake fix. Reported by: Prashant Jaikumar Fix handling of application data received before a handshake. (cherry picked from commit 0c75eeacd3285b395dc75b65c3e6fe6ffbef59f0) --- ssl/d1_pkt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ssl') diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 55765d1cfb..5bb3939bff 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -774,6 +774,12 @@ start: } } + if (s->d1->listen && rr->type != SSL3_RT_HANDSHAKE) + { + rr->length = 0; + goto start; + } + /* we now have a packet which can be read and processed */ if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec, -- cgit v1.2.3