summaryrefslogtreecommitdiff
path: root/net/tls
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-07 12:07:37 -0700
committerJakub Kicinski <kuba@kernel.org>2022-07-07 12:07:37 -0700
commit83ec88d81aa8762d4fb75f95365da6b73a38efe9 (patch)
tree193501a42e488ec81871136d19e0edb129a4a154 /net/tls
parentcf21b355ccb39b0de0b6a7362532bb5584c84a80 (diff)
parentef4ab3ba4e4f99b1f3af3a7b74815f59394d822e (diff)
downloadlinux-rpi-83ec88d81aa8762d4fb75f95365da6b73a38efe9.tar.gz
linux-rpi-83ec88d81aa8762d4fb75f95365da6b73a38efe9.tar.bz2
linux-rpi-83ec88d81aa8762d4fb75f95365da6b73a38efe9.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 79043bc3da39..f1777d67527f 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -269,9 +269,6 @@ static int tls_do_decryption(struct sock *sk,
}
darg->async = false;
- if (ret == -EBADMSG)
- TLS_INC_STATS(sock_net(sk), LINUX_MIB_TLSDECRYPTERROR);
-
return ret;
}
@@ -1593,8 +1590,11 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
}
err = decrypt_internal(sk, skb, dest, NULL, darg);
- if (err < 0)
+ if (err < 0) {
+ if (err == -EBADMSG)
+ TLS_INC_STATS(sock_net(sk), LINUX_MIB_TLSDECRYPTERROR);
return err;
+ }
if (darg->async)
goto decrypt_next;
/* If opportunistic TLS 1.3 ZC failed retry without ZC */