diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-07 06:09:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-07 15:58:28 +0200 |
commit | bc76e5bb1229ede1f26317b813099b0e983e4009 (patch) | |
tree | 45c1d1dee313315521eeb750a4dfcd89777af460 /net/tls/tls_sw.c | |
parent | net/tls: store async_capable on a single bit (diff) | |
download | linux-bc76e5bb1229ede1f26317b813099b0e983e4009.tar.xz linux-bc76e5bb1229ede1f26317b813099b0e983e4009.zip |
net/tls: store decrypted on a single bit
Use a single bit instead of boolean to remember if packet
was already decrypted.
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/tls_sw.c')
-rw-r--r-- | net/tls/tls_sw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index c006b587a7db..de7561d4cfa5 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1523,7 +1523,7 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb, rxm->offset += prot->prepend_size; rxm->full_len -= prot->overhead_size; tls_advance_record_sn(sk, prot, &tls_ctx->rx); - ctx->decrypted = true; + ctx->decrypted = 1; ctx->saved_data_ready(sk); } else { *zc = false; @@ -1933,7 +1933,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, tls_err_abort(sk, EBADMSG); goto splice_read_end; } - ctx->decrypted = true; + ctx->decrypted = 1; } rxm = strp_msg(skb); @@ -2034,7 +2034,7 @@ static void tls_queue(struct strparser *strp, struct sk_buff *skb) struct tls_context *tls_ctx = tls_get_ctx(strp->sk); struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx); - ctx->decrypted = false; + ctx->decrypted = 0; ctx->recv_pkt = skb; strp_pause(strp); |