]> 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)
commite7e2e10a022c45297ed22117df539d3f96e90cba
tree1f536025f74e954c908d37d0a322f2726f0fcc22
parent156181d45340f8f1b754a5dd3ad159905ec5d321
Revert "tls: rx: move counting TlsDecryptErrors for sync"

This reverts commit 41cd5581624fd2cb71e8680ad1afb25ee36d6e19.
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: 41cd5581624f ("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