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.
(cherry picked from commit bef5ef87f5)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
src/iperf_sctp.c
Should fix#177, in which compilation failed on older Solaris systems
that didn't have it. This is a different approach than a patch
suggested in that issue.
Weakly regression-tested on other platforms (test this by specifying
-6, -4, or neither to the server when binding to the wildcard address,
and seeing if a client can connect with various of -6, -4, or neither).
(cherry picked from commit 147d3369a0)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
src/iperf_sctp.c
This is the same functionality as the -B iperf3 command-line option.
Fixes#197.
(cherry picked from commit e0d039ea3c)
Signed-off-by: Bruce A. Mah <bmah@es.net>
On CentOS 6 and MacOS, if no address family was specified, we'd
get back an IPv4 address from getaddrinfo(3), with the result that
we couldn't accept IPv6 connections in the default server configuration.
There was an earlier attempt at fixing this problem that caused
Issue #193. This change is a follow-up fix to that issue.
While here, put lots of comments around the fix so we remember
why we're doing these shenanigans.
(cherry picked from commit 76b5942f6f)
Signed-off-by: Bruce A. Mah <bmah@es.net>
If specifying -B with an IPv4 literal address or with an FQDN that
resolved to an IPv4 address, but we had not explicitly specified an
address family with -4, we failed to set up the socket correctly
because we assumed binding to an IPv6 address, and instead (after some
error spewage) wound up binding to wildcard address.
The fix in this commit has multiple parts: First, if the address
family hasn't been explictly specified, don't force AF_INET6 in the
hints to getaddrinfo(3). AF_UNSPEC should generate the correct
(according to RFC 6724) behavior.
Second, iperf_reset_test() should not discard members that were passed
from command-line parameters, because that alters the behavior of the
iperf3 when it tries to recreate the listening socket. In the failure
situation described in this issue (and possibly other as well), the
value of -B gets discarded, so on subsequent attempts to set up the
listening socket it just binds to the wildcard address.
While here, fix on-line help related to the -B option to match
reality.
Note that we're not completely in compliance with RFC 6724, which
states that we should actually try all of the addresses in returned by
getaddrinfo(3), rather than just the first one.
Fixes Issue #193.
(cherry picked from commit 5b760eef47)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
src/locale.c
The various "connected" structures were just dumped into the "start"
structure. This caused problems if there were multiple connections
(i.e. multiple parallel streams), because the "connected" structures
would overwrite themselves. Instead, make these structures members
of a "connected" array.
This is technically an incompatible API change, but the prior behavior
was unusable.
Discovered and fix suggested by: @i2aaron
(cherry picked from commit a134ba0a02)
Signed-off-by: Bruce A. Mah <bmah@es.net>
available.
This can happen if needing to regenerate the autoconf goop on an
older system (such as CentOS 6), where PACKAGE_URL doesn't get
defined.
(cherry picked from commit 23c1008132)
Signed-off-by: Bruce A. Mah <bmah@es.net>
(cherry picked from commit 7ec1cbe0c8)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
docs/dev.rst
docs/index.rst
docs/news.rst
docs/obtaining.rst
retrieve (most of) the output emitted by the server.
If the server was invoked with the --json flag, the output will be in
JSON, otherwise it will be in the human-readable format.
If the client was invoked with the --json flag, the output will be
contained within the JSON output structure, otherwise it will be
appended (in whatever format) to the bottom of the human-readable
output.
Because of the sequencing of the output generation and display, the
server-side output includes only the starting output, interval
statistics and summaries, but not the overall summaries. (The overall
summaries were already displayed in the client's output.)
Towards issue #160.
(cherry picked from commit ba8d6e6246)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
src/iperf3.1
src/iperf_api.c
src/iperf_api.h
the best thing to do from a code hygeine standpoint, it's too
painful to try to get right for now.
Fixes#174 (second try).
(cherry picked from commit 94c0bfffcb)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
configure.ac
Only do -Wall by default if on GCC (or something that looks like
GCC, such as clang/llvm).
Turn on -Werror so we can get some better error-checking, but
we also need -Wno-deprecated-declarations at least for MacOS,
because daemon(3) is deprecated starting with MacOS 10.5.
Fixes#174 (I think).
Submitted by: @marksolaris
(cherry picked from commit 8de51b589f)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
configure.ac
An open(2) call had two arguments instead of the required three.
Fixes#183.
Submitted by @ssahani.
(cherry picked from commit c5e1205e49)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
src/iperf_api.c
side sockets). This is reported to fix some oddities after a recent
change in this area.
Somewhat related to Issue #125.
Submitted by: @i2aaron
(cherry picked from commit 6b16244baa)
Signed-off-by: Bruce A. Mah <bmah@es.net>
transfer.
Note that the sender can either be the client or the server depending
on whether --reverse is used.
This fixes some problems with UDP transfers getting severely confused
and (wrongly) complaining about packets arriving out of order.
Related to issue #125.
(cherry picked from commit cbacc1d670)
Signed-off-by: Bruce A. Mah <bmah@es.net>
This lets us tell easily from the JSON output whether a test was run in
--reverse mode or not. Resolves#167 (one comment made in that issue
anyway).
(cherry picked from commit ef3eae69bf)
Signed-off-by: Bruce A. Mah <bmah@es.net>
This definitely affected FreeBSD, which breaks POSIX.1 by not
setting CLOCKS_PER_SEC to 1000000 (see clock(3)). At this point
I can't tell if any other platforms were affected by this.
(cherry picked from commit bf219a4d51)
Signed-off-by: Bruce A. Mah <bmah@es.net>
using recent versions.
Resolves#161.
(cherry picked from commit 6edfd8d65c)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
Makefile.in
configure
configure.ac
src/Makefile.in
These simplify the release process because they eliminate a manual
file-editing step.
(cherry picked from commit d141c52dab)
Signed-off-by: Bruce A. Mah <bmah@es.net>
Conflicts:
configure.ac
src/locale.c
src/version.h.in