net/tls: Fix wrong record sn in async mode of device resync
authorTariq Toukan <tariqt@nvidia.com>
Sun, 15 Nov 2020 13:14:48 +0000 (15:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Nov 2020 22:41:20 +0000 (14:41 -0800)
commit138559b9f99d3b6b1d5e75c78facc067a23871c6
tree53999ef38799ce1c226ba835fdcbc83c8a56f2fe
parenta5bbcbf29089a1252c201b1a7fd38151de355db9
net/tls: Fix wrong record sn in async mode of device resync

In async_resync mode, we log the TCP seq of records until the async request
is completed.  Later, in case one of the logged seqs matches the resync
request, we return it, together with its record serial number.  Before this
fix, we mistakenly returned the serial number of the current record
instead.

Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Boris Pismenny <borisp@nvidia.com>
Link: https://lore.kernel.org/r/20201115131448.2702-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tls.h
net/tls/tls_device.c