aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_tcp.c
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@es.net>2014-04-10 11:20:36 -0700
committerBruce A. Mah <bmah@es.net>2014-04-10 11:20:36 -0700
commit4155c45471b52cd6f5d608f9d1424370da9dc5aa (patch)
treeed3df0ea6255ee04fa2bfb07f61077e6cb71e82a /src/iperf_tcp.c
parent8cb96d14055ce8260c8bebf859c393180217fb16 (diff)
downloadiperf3-4155c45471b52cd6f5d608f9d1424370da9dc5aa.tar.gz
Improve detection of IPv6 flowlabel support (Linux only).
We check at configure-time to see if IPV6_FLOWLABEL_MGR is defined in <linux/in.6>, if it is we set a HAVE_FLOWLABEL CPP symbol to turn on conditional compilation of the support for this feature.
Diffstat (limited to 'src/iperf_tcp.c')
-rw-r--r--src/iperf_tcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c
index 037bc16..7071aee 100644
--- a/src/iperf_tcp.c
+++ b/src/iperf_tcp.c
@@ -26,9 +26,9 @@
#include "iperf_tcp.h"
#include "net.h"
-#if defined(linux)
+#if defined(HAVE_FLOWLABEL)
#include "flowlabel.h"
-#endif
+#endif /* HAVE_FLOWLABEL */
/* iperf_tcp_recv
*
@@ -361,7 +361,7 @@ iperf_tcp_connect(struct iperf_test *test)
}
printf("SO_SNDBUF is %u\n", opt);
}
-#if defined(linux)
+#if defined(HAVE_FLOWLABEL)
if (test->settings->flowlabel) {
if (server_res->ai_addr->sa_family != AF_INET6) {
saved_errno = errno;
@@ -404,7 +404,7 @@ iperf_tcp_connect(struct iperf_test *test)
}
}
}
-#endif
+#endif /* HAVE_FLOWLABEL */
#if defined(linux) && defined(TCP_CONGESTION)
if (test->congestion) {