When setting up the DTLS session, close the previous DTLS session if it exists.

Resolves: #293

Signed-off-by: Alan Jowett alanjo@microsoft.com
This commit is contained in:
Alan Jowett
2020-04-27 09:25:46 -06:00
committed by Nikos Mavrogiannopoulos
parent d2def367c3
commit 75470d99c3
2 changed files with 5 additions and 0 deletions

1
NEWS
View File

@@ -2,6 +2,7 @@
- When Linux OOM takes control kill ocserv workers before ocserv-main
or ocserv-secmod (#283).
- Disable TCP queuing on the TLS port.
- Fix leak of GnuTLS session when DTLS connection is re-established (#293).
* Version 1.0.1 (released 2020-04-09)

View File

@@ -387,6 +387,10 @@ static int setup_dtls_connection(struct worker_st *ws)
/* reset MTU */
link_mtu_set(ws, ws->adv_link_mtu);
if (ws->dtls_session != NULL) {
gnutls_deinit(ws->dtls_session);
}
ws->dtls_session = session;
return 0;