aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-08-17Upgrade iperf3 to 3.9Haibo Huang
Change-Id: I78a0e002d0b411e58808335eedc8391123318410
2020-08-14fix: Unbreak build on CentOS 6. (#1040)Bruce A. Mah
The fix eliminates a duplicate definition of the iperf_size_t datatype when both iperf.h and iperf_api.h are included. Fixes #1039.
2020-08-12fix: Remove debugging code that shouldn't have been committed.Bruce A. Mah
Thanks to @rantala for finding this. Follow-on to #1023 / #1033.
2020-08-03fix: Plug various minor memory leaks (#1033)Bruce A. Mah
* 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.
2020-07-24fix: Emit error message for an unknown i_error, rather than an empty string. ↵Bruce A. Mah
(#1030) Suggested by @david-BarOn. Towards #1022.
2020-07-23feat: Add a --timestamps flag to prepend a timestamp per output line. (#1028)Bruce A. Mah
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.
2020-07-10Upgrade iperf3 to 3.8android-r-beta-3android-r-beta-2Haibo Huang
Change-Id: Ie2c6b685ea0ed261585080a6cdaed0ef2d80d498
2020-07-10fix: Correctly emit an error message when unable to get a password. (#1026)Bruce A. Mah
This occurs when iperf3 is being run with authentication and it tries to get a password interactively, but there's no tty available. Fixes #1024.
2020-07-10Issue 999 follow up (#1025)Bruce A. Mah
* 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.
2020-07-10feat: Issue #937 - Add a server option to limit total allowed throughput (#999)David Bar-On
2020-07-07fix: Prevent 100% CPU usage when --bidir option is enabled. (#1011)Yun Jiang
2020-06-12chore: Change applicable function arguments from 'char *' to 'const char *' ↵David Bar-On
(#1006) Fixes #946. Should not present any functional changes.
2020-06-12Fix warning: "HAVE_SCTP" redefined (#1010)Stefano Garzarella
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>
2020-06-08chore: iperf-3.8 release engineering changes (#1012)Bruce A. Mah
Updates version numbers, release notes, etc.
2020-05-22fix: Fix stupid memory leak. (#1005)Bruce A. Mah
Pointed out by @oleh-yudin-ring. Follow-up to #996.
2020-05-20Regen.Bruce A. Mah
2020-05-20Add tests for iperf_api functions.Bruce A. Mah
2020-05-20fix(auth): Fix a potential buffer overflow in iperf3 client.Bruce A. Mah
This condition was only possible when configuration authentication via the libiperf API. While here, also fix a few other sundry issues: * Remove arbitrary length limits on username and password. * Improved error handling. * Updated error messages for readability. * Fixed minor typo in some identifiers. Fixes #996.
2020-05-19fix: Fix memory management issues around calls to cJSON_Print() (#997)Bruce A. Mah
Related to #883.
2020-05-19feat(api): Provide API access to --commit-timeout. (#1001)Bruce A. Mah
Fixes #1000. Part of #595.
2020-05-12fix(udp): Properly initialize for the first UDP packet received. (#990)Bruce A. Mah
This fixes a problem where UDP tests between systems with significant clock skew would register large amounts of jitter at the start of the test. Fixes #842. Analysis done by (and solution inspired by) @davidBar-On.
2020-05-11bug(udp): Fix minor problem in a debug message. (#995)Bruce A. Mah
Fixes #993. Submitted by @davidBar-On.
2020-05-04Regen.Bruce A. Mah
2020-05-04Fix for possible leaks or double frees (#968)Michal Ruprich
2020-04-14chore: Fix whitespace glitch that caused a compiler warning on Ubuntu 18.04.Bruce A. Mah
Whitespace-only change, no functional difference.
2020-04-14enh: Update cJSON to 1.7.13 (#978)Bruce A. Mah
This is a modified version of cJSON with support for 64-bit integers. This change pulls in some bug fixes and security fixes. It also fixes some compiler warnings on ILP32, caused by the way that we imported the previous cJSON (fixes inspired by #855).
2020-03-27fix (iperf_api): fix compiler warning while printing an uint64_t (#969)Stefano Garzarella
Fix the following warning: ../../src/iperf_api.c: In function ‘iperf_on_connect’: ../../src/iperf_api.c:791:58: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=] Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2020-03-17fix: include iperf_util.h in main.c (#954)Tamir Duberstein
73b02f9 implemented `daemon(3)` for systems that don't have it, but the function prototype was never included in `main.c` where it is referenced.
2020-03-17fix(cygwin): Fix compile error where CPU_SETSIZE isn't defined. (#948)Bruce A. Mah
Based on a fix from @RomelSan. Fixes #944.
2020-01-06Fix memory leaks for RSA key setters (#949)Oleh Yudin
Originally discussed in #940.
2020-01-06build: Unbreak builds on macOS by not building profiled binaries by default ↵Bruce A. Mah
(#950) Fixes #933.
2020-01-03fix cjson warning: "true" and "false redefinedXiang Xiao
the similar change also exist in the offical git: https://github.com/DaveGamble/cJSON Part of #935. Change-Id: I3d98de3ec893ccf0b0cab37acc2dbfef00d9e2b6 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit 98c868360c858f4c5fd466bd03fd157ac56b3f06) Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-03ensure build_tcpinfo_message TCP_INFO check consistent with ↵Xiang Xiao
iperf_interval_results Part of #935. Change-Id: Id702dee9d894d91420719928ae2de6b44b72f579 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit 9dab732f5ec41be873cae3351b3d57fbfad36c93) Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-02fix hotn?, strcasecmp and timeval isn't defined errorXiang Xiao
by including arpa/inet.h, strings.h and sys/timer.h Part of #935. Change-Id: Ibac8d3a992457f2a7cc10f74b144e3ebe69976d8 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit b9aa6cef43b338666a72bf6425fc88ed7602bce5) Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-02check SIGINT/SIGTERM/SIGHUP defined before using themXiang Xiao
since not all platform define these signal number Part of #935. Change-Id: I98f14590ad45d1fe7e61076cce5a76b7874772ea Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit d4267b66b5550c0e4cfec60439eab1d57a4a0c7a) Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-02fix warning: "HAVE_NETINET_IN_SYSTM_H"/"HAVE_NETINET_IP_H" is not definedXiang Xiao
Part of #935. Change-Id: Ibcc4ad4370a6f99b030ca2c44f151c4550695957 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit 6c10c3e6e65ffca32d97b3f2ef4db839c049a85c) Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-02change some file mode from 100755 to 100644Xiang Xiao
Part of #935. Change-Id: I5c563ad0cffce1a75b6a8039aa9a2e1543763880 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> (cherry picked from commit d7e30bea791e7bcd28eebf1ca6fe39e4f00ddc3c) Signed-off-by: Bruce A. Mah <bmah@es.net>
2019-12-20fix: Copy some strings passed as API parameters for consistency with CLI. (#943)Bruce A. Mah
Fixes #939.
2019-12-20fix: Make prototype for iperf_set_test_extra_data() match its definition.Bruce A. Mah
Fixes #938.
2019-11-01add window size support for sctp (#926)wallyatgithub
2019-10-01fix: fix burst mode throttle checking (#898)Ondrej Lichtner
When burst mode is configured for unlimited rate (-b0) but with a specific packet burst value (e.g. /1000), iperf only sends packets once, after that the iperf_check_throttle function gets called and sets green_light=0 due to the rate value being 0 and average calculated rate always being higher than 0. The iperf_check_throttle function is designed to be skipped in case the target rate is unlimited or if a specific burst value was configured, however this skip is only utilized in one place where the function is called leading to the situation above. This can be fixed by moving the "skip throttling" condition directly inside the iperf_check_throttle function. Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
2019-10-01enh: Add server authentication API functions (#911)Allen Flickinger
2019-08-19fix: Fix a bug in --bidir option processing (#903)Sergey Nemov
If --bidir option was passed before --client option on command line, the latter would override ipt->mode parameter of the test back to SENDER or RECEIVER making the test hang during execution. Fix this by checking if ipt->bidirectional was set to true in iperf_set_test_role() function.
2019-07-02Upgrade iperf3 to 3.7Haibo Huang
Test: None Change-Id: I022a655ee5627904e9fe60c9403608de4d61e747
2019-06-24doc: Document --bidir option in manpage. (#893)Bruce A. Mah
Fixes #890.
2019-06-18fix: Emit appropriate error messages from getaddrinfo(3). (#888)Bruce A. Mah
* fix: Emit appropriate error messages from getaddrinfo(3). This fixes an omission likely caused when switching resolver library calls. Fixes #846.
2019-06-18fix: Fix off-by-one memory overwrite crash and memory leaks (#887)Bruce A. Mah
The base64 decode will crash on musl c-library builds for OpenWRT due to the write of the '\0' past the end of the allocated buffer. Fix other various memory leaks on the authentication code paths. Fix some memory-free library calls into OpenSSL. Based heavily on PR #881 originally submitted by @acmay, with comments from @ralcini.
2019-06-14delay tearing down tcp control connectionsAndrew Cooks
The TEST_END message is racing with the server_timer_proc timer. When the RTT is higher than a second, the timer wins the race and closes the control socket before the results are exchanged. This results in the client reporting: "error - control socket has closed unexpectedly" as reported in GH issue 751. This change doesn't prevent the race, but significantly increases the grace period based on a maximum RTT of 4 seconds and accounts for the ten transitions in the iperf3 state machine. (cherry picked from commit 34bdddb75194e880e6dbc6dcaa5b5386975c11b3) (originally submitted by @acooks in #859)
2019-06-14Fix: Don't allow --port 0 or other invalid values. (#885)Bruce A. Mah
* Fix: Don't allow --port or --cport to take 0 or other invalid values. Fixes #884.
2019-06-05enh: Introduce iperf_set_test_logfile API function (#871)srgnk
To be able to set the test->outfile to a different file other than default if using libiperf API. Since logfile is now opened in iperf_parse_arguments() and this function may not be used if running iperf using API, define a dedicated function iperf_open_logfile() and move the opening of logfile into iperf_run_client() and iperf_run_server() to make sure logfile will be opened if iperf_parse_arguments() was not called.