File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6297,15 +6297,16 @@ static void event_new_fd(void *ctx)
62976297 this -> dead = true;
62986298
62996299 remove_now :
6300- sock = this -> data ;
6301-
6302- #if defined(WITH_PROXY ) && defined(WITH_TLS )
6303- if ((this -> type == RAD_LISTEN_PROXY ) && sock -> ssn ) {
6304- /*
6305- * Close it. Which sets the status to EOL, so we
6306- * have to update that, too.
6307- */
6308- sock -> client_closed = true; /* no need to call SSL_shutdown() */
6300+ #ifdef WITH_TLS
6301+ /*
6302+ * Close it. Which sets the status to EOL, so we
6303+ * have to update that, too.
6304+ *
6305+ * proxy_tls_close also clears this->tls, so it's
6306+ * safe run this check multiple times, as the
6307+ * second time it won't close the same socket.
6308+ */
6309+ if ((this -> type == RAD_LISTEN_PROXY ) && this -> tls ) {
63096310 proxy_tls_close (this );
63106311 this -> status = RAD_LISTEN_STATUS_REMOVE_NOW ;
63116312 }
@@ -6355,6 +6356,7 @@ static void event_new_fd(void *ctx)
63556356#endif
63566357 ) {
63576358 home_server_t * home ;
6359+ sock = this -> data ;
63586360
63596361 home = sock -> home ;
63606362 if (!home || !home -> limit .max_connections ) {
Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ void tls_socket_close(rad_listen_t *listener)
9292 ROPTIONAL (RDEBUG3 , DEBUG3 , "(TLS) Closing connection" );
9393 rad_free (& sock -> packet );
9494 TALLOC_FREE (sock -> request );
95- TALLOC_FREE (sock -> ssn );
9695 radius_update_listener (listener );
9796
9897 /*
You can’t perform that action at this time.
0 commit comments