diff options
author | Bruce A. Mah <bmah@es.net> | 2014-06-16 08:32:18 -0700 |
---|---|---|
committer | Bruce A. Mah <bmah@es.net> | 2014-06-16 08:32:18 -0700 |
commit | bef5ef87f58a4953a7165d3a5242f2a49cec32cf (patch) | |
tree | 38cda2bfd6da3bc83e2db7a683502467cd213c91 /src/iperf_tcp.c | |
parent | 147d3369a0a9f448875088915e74a284a46436ab (diff) | |
download | iperf3-bef5ef87f58a4953a7165d3a5242f2a49cec32cf.tar.gz |
Don't try to do IPV6_V6ONLY on OpenBSD either.
setsockopt(3) returns an error if passing 0 to this option (which
we do if no address family is specified when we bind to the wildcard
address, say by invoking "iperf3 -s" with no other options). This
is because OpenBSD explicitly does not support IPv4-mapped addresses,
so even though the IPV6_V6ONLY socket options exists, it only works
with a non-zero argument.
Fixes #196.
Diffstat (limited to 'src/iperf_tcp.c')
-rw-r--r-- | src/iperf_tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c index bb0a76e..766e9a8 100644 --- a/src/iperf_tcp.c +++ b/src/iperf_tcp.c @@ -216,7 +216,7 @@ iperf_tcp_listen(struct iperf_test *test) i_errno = IEREUSEADDR; return -1; } -#ifdef IPV6_V6ONLY +#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) if (test->settings->domain == AF_UNSPEC || test->settings->domain == AF_INET6) { if (test->settings->domain == AF_UNSPEC) opt = 0; |