]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: only copy IV from the packet for TLS 1.2
authorJakub Kicinski <kuba@kernel.org>
Mon, 11 Apr 2022 19:19:17 +0000 (12:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2022 10:45:39 +0000 (11:45 +0100)
commit186aa91456bed8a0a170f0cd7b3941a68cadae96
tree72688c7f291ba8b5e0b231f838d9a448081133f7
parent3d6b17b4bd5b2004d7fedfee7e909876f4f34394
tls: rx: only copy IV from the packet for TLS 1.2

TLS 1.3 and ChaChaPoly don't carry IV in the packet.
The code before this change would copy out iv_size
worth of whatever followed the TLS header in the packet
and then for TLS 1.3 | ChaCha overwrite that with
the sequence number. Waste of cycles especially
with TLS 1.2 being close to dead and TLS 1.3 being
the common case.

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