src/tcp_sample.c: use protocol from connection struct

This commit is contained in:
Bjrn Jacke 2021-10-25 21:08:27 +02:00 committed by Willy Tarreau
parent 0ea1796a8b
commit 59e121a9e3
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ static inline int get_tcp_info(const struct arg *args, struct sample *smp,
/* The fd may not be available for the tcp_info struct, and the
syscal can fail. */
optlen = sizeof(info);
if (getsockopt(conn->handle.fd, IPPROTO_TCP, TCP_INFO, &info, &optlen) == -1)
if (getsockopt(conn->handle.fd, conn->ctrl->sock_prot, TCP_INFO, &info, &optlen) == -1)
return 0;
/* extract the value. */