HomeFreeBSD

ktls: Fix error/mode confusion in TCP_*TLS_MODE getsockopt handlers

Description

ktls: Fix error/mode confusion in TCP_*TLS_MODE getsockopt handlers

ktls_get_(rx|tx)_mode() can return an errno value or a TLS mode, so
errors are effectively hidden. Fix this by using a separate output
parameter. Convert to the new socket buffer locking macros while here.

Note that the socket buffer lock is not needed to synchronize the
SOLISTENING check here, we can rely on the PCB lock.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31977

Details

Provenance
markjAuthored on Sep 17 2021, 4:14 PM
Reviewer
jhb
Differential Revision
D31977: ktls: Fix error/mode confusion in TCP_*TLS_MODE getsockopt handlers
Parents
rGd6e77cda9be1: uma: Show the count of free slabs in each per-domain keg's sysctl tree
Branches
Unknown
Tags
Unknown