[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200713183554.11719-3-vinay.yadav@chelsio.com>
Date: Tue, 14 Jul 2020 00:05:55 +0530
From: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
To: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org
Cc: secdev@...lsio.com, Vinay Kumar Yadav <vinay.yadav@...lsio.com>
Subject: [PATCH net-next 2/3] crypto/chtls: fix tls alert messages
When tls data skb is pending for Tx and tls alert comes , It
is wrongly overwrite the record type of tls data to tls alert
record type. fix the issue correcting it.
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
---
drivers/crypto/chelsio/chtls/chtls_io.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/chtls_io.c
index e1401d9cc..2e9acae1c 100644
--- a/drivers/crypto/chelsio/chtls/chtls_io.c
+++ b/drivers/crypto/chelsio/chtls/chtls_io.c
@@ -1052,14 +1052,15 @@ int chtls_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
&record_type);
if (err)
goto out_err;
+
+ /* Avoid appending tls handshake, alert to tls data */
+ if (skb)
+ tx_skb_finalize(skb);
}
recordsz = size;
csk->tlshws.txleft = recordsz;
csk->tlshws.type = record_type;
-
- if (skb)
- ULP_SKB_CB(skb)->ulp.tls.type = record_type;
}
if (!skb || (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_NO_APPEND) ||
--
2.18.1
Powered by blists - more mailing lists