summaryrefslogtreecommitdiff
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-07-27 20:36:44 +0300
committerJakub Kicinski <kuba@kernel.org>2023-07-29 00:07:59 +0300
commit5dd5ad682cfe9550a37634a8f55780ebd74edbe8 (patch)
treee7b31a793f1a916ad4c477108b4fb37350dab72f /net/sunrpc/svcsock.c
parent35b1b538d422fd765d88fbdaaa6e06ee466d9f93 (diff)
downloadlinux-5dd5ad682cfe9550a37634a8f55780ebd74edbe8.tar.xz
SUNRPC: Send TLS Closure alerts before closing a TCP socket
Before closing a TCP connection, the TLS protocol wants peers to send session close Alert notifications. Add those in both the RPC client and server. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/169047939404.5241.14392506226409865832.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 449df8cabfcb..cca6ee716020 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1622,6 +1622,8 @@ static void svc_tcp_sock_detach(struct svc_xprt *xprt)
{
struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt);
+ tls_handshake_close(svsk->sk_sock);
+
svc_sock_detach(xprt);
if (!test_bit(XPT_LISTENER, &xprt->xpt_flags)) {