Skip to content

Commit

Permalink
net/tls: don't re-check msg decrypted status in tls_device_decrypted()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Jun 4, 2019
1 parent b9d8fec commit 1fe275d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/tls/tls_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1fe275d

Please sign in to comment.