src/tcp_sample.c: use protocol from connection struct
This commit is contained in:
parent
0ea1796a8b
commit
59e121a9e3
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue