diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-06-04 01:17:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-05 00:33:50 +0300 |
commit | 1fe275d434ad4ff2d576f9a770eb4c192153ea1d (patch) | |
tree | a3b67335c6013241b0e845b73e11080daf61c05b /net/tls | |
parent | b9d8fec927ef3cd157e6a0956f5ec89f6891ed27 (diff) | |
download | linux-1fe275d434ad4ff2d576f9a770eb4c192153ea1d.tar.xz |
net/tls: don't re-check msg decrypted status in tls_device_decrypted()
tls_device_decrypted() is only called from decrypt_skb_update(),
when ctx->decrypted == false, there is no need to re-check the bit.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index dde6513628d2..bb9d229832cc 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -672,10 +672,6 @@ int tls_device_decrypted(struct sock *sk, struct sk_buff *skb) int is_encrypted = !is_decrypted; struct sk_buff *skb_iter; - /* Skip if it is already decrypted */ - if (ctx->sw.decrypted) - return 0; - /* Check if all the data is decrypted already */ skb_walk_frags(skb, skb_iter) { is_decrypted &= skb_iter->decrypted; |