From: Willy Tarreau Date: Wed, 24 Dec 2025 16:04:22 +0000 (+0100) Subject: MINOR: tcp: implement the get_opt() function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52d60bf9eef3147d9c8a15ebac63d334c5a32dbf;p=thirdparty%2Fhaproxy.git MINOR: tcp: implement the get_opt() function It relies on the generic sock_conn_get_opt() function and will permit sample fetch functions to retrieve generic TCP-level info. --- diff --git a/src/proto_tcp.c b/src/proto_tcp.c index b90445868..1182922ce 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -76,6 +76,7 @@ struct protocol proto_tcpv4 = { .check_events = sock_check_events, .ignore_events = sock_ignore_events, .get_info = tcp_get_info, + .get_opt = sock_conn_get_opt, /* binding layer */ .rx_suspend = tcp_suspend_receiver, @@ -121,6 +122,7 @@ struct protocol proto_tcpv6 = { .check_events = sock_check_events, .ignore_events = sock_ignore_events, .get_info = tcp_get_info, + .get_opt = sock_conn_get_opt, /* binding layer */ .rx_suspend = tcp_suspend_receiver, @@ -167,6 +169,7 @@ struct protocol proto_mptcpv4 = { .check_events = sock_check_events, .ignore_events = sock_ignore_events, .get_info = tcp_get_info, + .get_opt = sock_conn_get_opt, /* binding layer */ .rx_suspend = tcp_suspend_receiver, @@ -212,6 +215,7 @@ struct protocol proto_mptcpv6 = { .check_events = sock_check_events, .ignore_events = sock_ignore_events, .get_info = tcp_get_info, + .get_opt = sock_conn_get_opt, /* binding layer */ .rx_suspend = tcp_suspend_receiver,