For every new connection we saved the name of the congestion
control algorithm, but if there were multiple connections we'd
leak all but the last name.
Fixes#1100.
This lets iperf work better with multi-homed machines and
VRF.
Fixes#1089.
Based on a patch by Ben Greear <greearb@candelatech.com> via PR #817.
Co-authored-by: Ben Greear <greearb@candelatech.com>
We now only count an attempted send once all of its bytes are sent
(and will perform partial sends if necessary to finish sending all the bytes).
Previously, partial sends were counted as completed, for the purpose
of the -k option.
When the -b option specifies a burst value, throttling the bitrate does not work. This is because iperf_check_throttle() does not perform the check when burst value was defined.
This change removes the dependency of iperf_check_throttle() on the burst value and moves that check to the caller of that function. (Except for the call by send_timer_proc() which does not seem to be related to the change.)
Making sure the server closes prot_listener socket at the end of a session with a client. Without this change the socket may remain open, for example when there is a failure during the UDP stream establishment because the --window value is too high. Closing the socket was added to cleanup_server() as it seems to handle all cases where the socket may remain open.
* Issue 1065
* feat: Allow to configure a custom value for time drift between client/server for authentication
The use case is to support scenarios where it's not possible to enforce sync between client and server times.
* enh: drift redefined with skew
Co-authored-by: Francesco Marino <francesco.marino@cybaze.it>
The goal is to improve the responsiveness and/or reliability of
messages on the control connection, particularly in cases where the
test traffic fills up the path between client and server.
Originally suggested and implemented by @andrepuschmann, this version
adds some error-checking and a version for the client side as well as
the server.
Fixes#1045.
It didn't make anything crash, but API clients wouldn't be able to
access the JSON output.
Bug pointed out, and fix suggested by, @scottmsilver. Fixes#1058.
On a 32-bit PowerPC Linux system using musl libc (with 64-bit time_t),
the t_auth test fails because `long` is not the same type as `time_t`.
This patch uses an int64_t temporary value, which can be truncated to
32-bit if necessary.
* fix: Make --reverse tests with --blockcount or --bytes actually terminate.
Note that these options still don't really give intuitive results, because
the ending conditions are evaluated on the client, which then needs to
convey to the server via the control channel to stop sending. This
will almost never result in the desired outcome of "a test of exactly
N sends (or bytes) sent from the server to the client".
Also add test cases for --blockcount / --bytes with --reverse.
Towards #982.
* fix: Fix memory leaks related to --logfile.
* fix: Fix memory leaks related to loading RSA keys.
* fix: Fix some memory leaks in failure cases in the iperf3 client.
Fixes#1023.
This flag takes an optional argument, which is a format specification to strftime(3)...this allows for custom timestamp formats. Based on a suggested implementation by @davidBar-On. Towards #909.
* doc: Add manpage text for --server-bitrate-limit.
While here, normalize the manpage text for all command-line options
that take [KMGT] scaling suffixes (there were about three different
strings in use).
* doc: Bump manpage date.
* fix: Fix printf format string warnings on macOS.
* fix: Fix compatibility definition of PRIu64 in iperf_udp.c to match iperf.h.
The variable enable_profiling exists just because AC_ARG_ENABLE([profiling] is defined.
If it is redefined in the exist condition, the both enable and disable flags will enable the profiling,
just if the flag is missing it will be disabled.
Reference in Warning here: https://autotools.io/autoconf/arguments.html
The netinet/sctp.h header file defines HAVE_SCTP, so we have this
warning while building:
In file included from ../../src/iperf.h:30,
from ../../src/iperf_sctp.c:46:
./iperf_config.h:44: warning: "HAVE_SCTP" redefined
44 | #define HAVE_SCTP 1
|
In file included from ../../src/iperf_sctp.c:43:
/usr/include/netinet/sctp.h:56: note: this is the location of the previous definition
56 | #define HAVE_SCTP
|
This patch replaces our HAVE_SCTP definition with HAVE_SCTP_H to avoid
this warning.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
* feat: Add a mechanism to disable checks for SCTP (--without-sctp).
The use case for this is building a static iperf3 binary on CentOS 7,
on a system with SCTP installed (but it has no static SCTP libraries).
In that case we need to disable SCTP detection to prevent a linking
error at runtime.
While here, s/iperf /iperf3 / in a couple of help strings.