From 12a1eb2d6f147a43d358694b4fd34696ae33fd5b Mon Sep 17 00:00:00 2001 From: jsing Date: Sat, 19 Jun 2021 16:38:27 +0000 Subject: [PATCH] Initialise the epoch for the DTLS processed and unprocessed queues. Currently these only get correctly initialised when dtls1_process_buffered_records() is called - while this works it is more accidental than intentional. ok tb@ --- lib/libssl/d1_lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c index dbc89e6f465..bc00ab8ca40 100644 --- a/lib/libssl/d1_lib.c +++ b/lib/libssl/d1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_lib.c,v 1.54 2021/05/16 13:56:30 jsing Exp $ */ +/* $OpenBSD: d1_lib.c,v 1.55 2021/06/19 16:38:27 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -197,6 +197,9 @@ dtls1_clear(SSL *s) memset(s->d1, 0, sizeof(*s->d1)); s->d1->internal = internal; + D1I(s)->processed_rcds.epoch = D1I(s)->r_epoch; + D1I(s)->unprocessed_rcds.epoch = D1I(s)->r_epoch + 1; + if (s->server) { D1I(s)->cookie_len = sizeof(D1I(s)->cookie); } -- 2.20.1