so_splice: Fix the KTLS check for the sink socket in so_splice()

Reviewed by:	gallatin
Reported by:	Claude Sonnet 4.6
Fixes:		1000cc4a0d ("so_splice: Disallow splicing with KTLS-enabled sockets")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56385

(cherry picked from commit d88a159da4)
This commit is contained in:
Mark Johnston committed 2026-07-14 14:08:40 +00:00
1 parent 1d5f1086c4
commit 60585ee63a
1 file changed
+1 -1
+1 -1
View File
@@ -1707,7 +1707,7 @@ so_splice(struct socket *so, struct socket *so2, struct splice *splice)
return (error);
}
SOCK_SENDBUF_LOCK(so2);
if (so->so_snd.sb_tls_info != NULL) {
if (so2->so_snd.sb_tls_info != NULL) {
SOCK_SENDBUF_UNLOCK(so2);
SOCK_UNLOCK(so2);
so_unsplice(so, false);