git: a096a97448cf - releng/15.1 - so_splice: Fix the KTLS check for the sink socket in so_splice()

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Thu, 07 May 2026 20:40:23 UTC
The branch releng/15.1 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=a096a97448cfc7e593bcf8873c0f0d3b94f219f1

commit a096a97448cfc7e593bcf8873c0f0d3b94f219f1
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-04-16 19:57:36 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-05-07 20:40:02 +0000

    so_splice: Fix the KTLS check for the sink socket in so_splice()
    
    Approved by:    re (cperciva)
    Reviewed by:    gallatin
    Reported by:    Claude Sonnet 4.6
    Fixes:          1000cc4a0d39 ("so_splice: Disallow splicing with KTLS-enabled sockets")
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D56385
    
    (cherry picked from commit d88a159da42a75dbd46ea4f6f9c8059975dab5e8)
    (cherry picked from commit 43b1de5970d1246aa54d8e34b0f211511cc2b103)
---
 sys/kern/uipc_socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 358393a3bf9a..d2ad4e147da5 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1736,7 +1736,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);
 		mtx_lock(&sp->mtx);