]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "tls: rx: move counting TlsDecryptErrors for sync"
authorGal Pressman <gal@nvidia.com>
Tue, 5 Jul 2022 11:08:37 +0000 (14:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2022 12:10:59 +0000 (13:10 +0100)
commitdac93e413ffa6fdb0b1e7b4e022bef127a7bf659
tree1f536025f74e954c908d37d0a322f2726f0fcc22
parent08fe431d5b6e0a80ed12eb48d60c67d9ad287938
Revert "tls: rx: move counting TlsDecryptErrors for sync"

This reverts commit 30ead968b9220bf175b3568d52c501b10f95d10f.
When using TLS device offload and coming from tls_device_reencrypt()
flow, -EBADMSG error in tls_do_decryption() should not be counted
towards the TLSTlsDecryptError counter.

Move the counter increase back to the decrypt_internal() call site in
decrypt_skb_update().
This also fixes an issue where:
if (n_sgin < 1)
return -EBADMSG;

Errors in decrypt_internal() were not counted after the cited patch.

Fixes: 30ead968b922 ("tls: rx: move counting TlsDecryptErrors for sync")
Cc: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c