]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: Revert part of clarifying samples support per os commit
authorBrad Smith <brad@comstyle.com>
Fri, 26 Aug 2022 03:13:38 +0000 (23:13 -0400)
committerWilly Tarreau <w@1wt.eu>
Sat, 3 Sep 2022 04:11:08 +0000 (06:11 +0200)
Commit 5c83e3a1563cd7face299bf08037e51f976eb5e3 made some adjustments
to clarify which TCP_INFO information is supported by each respective
OS.

There was a comment like so..

Note that fc_rtt and fc_rttvar are supported on any OS that has TCP_INFO,
not just linux/freebsd/netbsd, so we continue to expose them unconditionally.

But the diff didn't do so in a consistent manner.

src/tcp_sample.c

index 300ce1c8d4f402481e86ff1fa5b5754fa14a7582..925b93291567b4ca95f83344ed16f1253758a029 100644 (file)
@@ -373,7 +373,6 @@ static inline int get_tcp_info(const struct arg *args, struct sample *smp,
        return 1;
 }
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
 /* get the mean rtt of a client connection */
 static int
 smp_fetch_fc_rtt(const struct arg *args, struct sample *smp, const char *kw, void *private)
@@ -387,9 +386,7 @@ smp_fetch_fc_rtt(const struct arg *args, struct sample *smp, const char *kw, voi
 
        return 1;
 }
-#endif
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
 /* get the variance of the mean rtt of a client connection */
 static int
 smp_fetch_fc_rttvar(const struct arg *args, struct sample *smp, const char *kw, void *private)
@@ -403,8 +400,6 @@ smp_fetch_fc_rttvar(const struct arg *args, struct sample *smp, const char *kw,
 
        return 1;
 }
-#endif
-
 
 #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
 /* get the unacked counter on a client connection */