Skip to content

Commit

Permalink
close the connection after sending tls alerts in the queue
Browse files Browse the repository at this point in the history
  • Loading branch information
avbelov23 committed Jul 24, 2019
1 parent 99d75b0 commit 087018c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tempesta_fw/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 087018c

Please sign in to comment.