aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/tls
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-10-06 21:09:31 -0700
committerDavid S. Miller <davem@davemloft.net>2019-10-07 09:58:27 -0400
commit5c5458ec9d631fbca29f53a944168265e18aa77a (patch)
treeb9488dc0705bf05ad0287490c537b40815b26ef7 /net/tls
parentnet/tls: pass context to tls_device_decrypted() (diff)
downloadwireguard-linux-5c5458ec9d631fbca29f53a944168265e18aa77a.tar.xz
wireguard-linux-5c5458ec9d631fbca29f53a944168265e18aa77a.zip
net/tls: store async_capable on a single bit
Store async_capable on a single bit instead of a full integer to save space. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 954f451dcc57..c006b587a7db 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2391,10 +2391,11 @@ int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx)
tfm = crypto_aead_tfm(sw_ctx_rx->aead_recv);
if (crypto_info->version == TLS_1_3_VERSION)
- sw_ctx_rx->async_capable = false;
+ sw_ctx_rx->async_capable = 0;
else
sw_ctx_rx->async_capable =
- tfm->__crt_alg->cra_flags & CRYPTO_ALG_ASYNC;
+ !!(tfm->__crt_alg->cra_flags &
+ CRYPTO_ALG_ASYNC);
/* Set up strparser */
memset(&cb, 0, sizeof(cb));