]> 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)
commitd9fd78854cf7417441322a0c94dcf797af363df9
tree75bc10a8d2547302fc5d8d560cbb5601ef95bb86
parent803d4a5c2dbbc36c04c9502c22b1bb7af38ff44d
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