ktls: Fix non-inplace TLS 1.3 encryption.

Copy the iovec for the trailer from the proper place.  This is the same
fix for CBC encryption from ff6a7e4ba6.

Reported by:	gallatin
Reviewed by:	gallatin, markj
Fixes:		49f6925ca
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D29177
This commit is contained in:
John Baldwin 2021-03-10 11:07:40 -08:00
parent 2cee045b4d
commit 3fa034210c
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls,
if (!inplace) {
/* Duplicate the output iov to append the trailer. */
memcpy(out_iov, outiov, outiovcnt * sizeof(*out_iov));
out_iov[outiovcnt] = iov[outiovcnt];
out_iov[outiovcnt] = iov[iniovcnt];
out_uio.uio_iov = out_iov;
out_uio.uio_iovcnt = outiovcnt + 1;