]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: return the decrypted skb via darg
authorJakub Kicinski <kuba@kernel.org>
Fri, 15 Jul 2022 05:22:31 +0000 (22:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 10:24:11 +0000 (11:24 +0100)
commitcb92883a9595784c43ceb9d3f6400340b8ca4a25
tree75bc10a8d2547302fc5d8d560cbb5601ef95bb86
parent08f36b13c80b5f1e383967d1d612b26b2551bd03
tls: rx: return the decrypted skb via darg

Instead of using ctx->recv_pkt after decryption read the skb
from darg.skb. This moves the decision of what the "output skb"
is to the decrypt handlers. For now after decrypt handler returns
successfully ctx->recv_pkt is simply moved to darg.skb, but it
will change soon.

Note that tls_decrypt_sg() cannot clear the ctx->recv_pkt
because it gets called to re-encrypt (i.e. by the device offload).
So we need an awkward temporary if() in tls_rx_one_record().

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c