Skip to content

Commit 2d68953

Browse files
pasisAlexanderGrissik
authored andcommitted
issue: 4424775 Skip kernel setsockopt() for TCP_ULP
Kernel supports TLS ULP only for a TCP socket in the ESTABLISHED state. Since the shadow socket cannot be established for an offloaded socket, we always expect TCP_ULP to fail in kernel. Therefore, don't call it. Signed-off-by: Dmytro Podgornyi <[email protected]>
1 parent 887b2ab commit 2d68953

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/sock/sockinfo_tcp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,6 +3748,7 @@ int sockinfo_tcp::tcp_setsockopt(int __level, int __optname, __const void *__opt
37483748
break;
37493749
case TCP_ULP: {
37503750
sockinfo_tcp_ops *ops {nullptr};
3751+
pass_to_os_cond = false;
37513752
#ifdef DEFINED_UTLS
37523753
if (__optval && __optlen >= 3 && strncmp((char *)__optval, "tls", 3) == 0) {
37533754
if (is_utls_supported(UTLS_MODE_TX | UTLS_MODE_RX)) {
@@ -3777,8 +3778,6 @@ int sockinfo_tcp::tcp_setsockopt(int __level, int __optname, __const void *__opt
37773778
lock_tcp_con();
37783779
set_ops(ops);
37793780
unlock_tcp_con();
3780-
/* On success we call kernel setsockopt() in case this socket is not connected
3781-
and is unoffloaded later. */
37823781
break;
37833782
}
37843783
case TCP_CONGESTION:

0 commit comments

Comments
 (0)