]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Handle CPL_RX_DATA on active TLS sockets.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 23 Oct 2020 00:23:54 +0000 (00:23 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 23 Oct 2020 00:23:54 +0000 (00:23 +0000)
commit8a82be504499c444e8fe9cb9eb41bee10d358b4d
tree59ee45787dbb0400a1c0c17da70e45d3a4e4821d
parent7dbbd1aeaed98e379ee3b1589f659831dd39709c
Handle CPL_RX_DATA on active TLS sockets.

In certain edge cases, the NIC might have only received a partial TLS
record which it needs to return to the driver.  For example, if the
local socket was closed while data was still in flight, a partial TLS
record might be pending when the connection is closed.  Receiving a
RST in the middle of a TLS record is another example.  When this
happens, the firmware returns the the partial TLS record as plain TCP
data via CPL_RX_DATA.  Handle these requests by returning an error to
OpenSSL (via so_error for KTLS or via an error TLS record header for
the older Chelsio OpenSSL interface).

Reported by: Sony Arpita Das @ Chelsio
Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: Revision: https://reviews.freebsd.org/D26800
sys/dev/cxgbe/tom/t4_cpl_io.c
sys/dev/cxgbe/tom/t4_tls.c
sys/dev/cxgbe/tom/t4_tom.h