aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/d1_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/ssl/d1_lib.c')
-rw-r--r--openssl/ssl/d1_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openssl/ssl/d1_lib.c b/openssl/ssl/d1_lib.c
index 94acb15de..011d7b7cb 100644
--- a/openssl/ssl/d1_lib.c
+++ b/openssl/ssl/d1_lib.c
@@ -496,6 +496,9 @@ int dtls1_listen(SSL *s, struct sockaddr *client)
{
int ret;
+ /* Ensure there is no state left over from a previous invocation */
+ SSL_clear(s);
+
SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
s->d1->listen = 1;