From 087018c96f60b60490b353f150d05329f59c96c9 Mon Sep 17 00:00:00 2001 From: Artyom Belov Date: Tue, 23 Jul 2019 22:41:31 +0300 Subject: [PATCH] close the connection after sending tls alerts in the queue --- tempesta_fw/sock.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tempesta_fw/sock.c b/tempesta_fw/sock.c index 9e3ad5581e..56a89d35f3 100644 --- a/tempesta_fw/sock.c +++ b/tempesta_fw/sock.c @@ -866,17 +866,21 @@ ss_tcp_data_ready(struct sock *sk) if (ss_tcp_process_data(sk) && !(SS_CONN_TYPE(sk) & Conn_Stop)) { /* - * Drop connection in case of internal errors, + * Close connection in case of internal errors, * banned packets, or FIN in the received packet, * and only if it's not on hold until explicitly * closed. * - * ss_linkerror() is responsible for calling + * ss_close() is responsible for calling * application layer connection closing callback. * The callback will free all SKBs linked with * the message that is currently being processed. + * + * Use ss_close() to close the connection after + * sending responses in the queue, for example, + * tls alerts */ - ss_linkerror(sk); + ss_close(sk, SS_F_SYNC); } } else {