aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-01-26Fix a server-side crash with --verbose and a client with multiple ↵Bruce A. Mah
connections. (#696) This was caused by a stale / invalid pointer reference that didn't even make any sense in context anyway. Fixes #686.
2018-01-26If we're sending output to stdout, then make errors go to stderr. (#695)Bruce A. Mah
No effect on JSON format output or output to a file. Submitted by @cygnus2048, fixes #688.
2018-01-26Make IPv6 flow labels work correctly where they didn't before. (#694)Bruce A. Mah
This can happen with multiple parallel streams or with two single stream tests run close together in time. The fix is to allow flow labels to be reused by multiple sockets simultaneously or within their timeout. Submitted by @cygnus2048 and fixes #689.
2018-01-26Fix large values of -p on FreeBSD by setting a large listen(2) backlog. (#693)Bruce A. Mah
Might be useful for other platforms as well (no effects on Linux because the semantics of listen(2) are subtly different there). Submitted by Matt Macy. Fixes #691.
2018-01-03Fix regression that caused client to close control connection prematurely. ↵Bruce A. Mah
(#682) The user-visible symptom was messages of the following form on the server: iperf3: the client has unexpectedly closed the connection This bug was introduced in #597 and was present in iperf 3.2 and 3.3. Fixes #677.
2018-01-03Include signal.h + time.h. (#680)Suresh Sundriyal
Required to avoid implicit declarations of 'signal()' and 'time()'; which causes compilation to error out while compiling a statically linked binary.
2018-01-02Fix comparison when checking for time skew when using authentication. (#674)Bruce A. Mah
Fixes #673. Submitted by @FuzzyStatic, reviewed by @ralcini.
2017-11-27Fix a couple of problems with the help message for the --length option.Bruce A. Mah
* The canonical long-form option name is "length", not "len". * The default length for UDP should be displayed in bytes not KB.
2017-11-16Fix a compiler warning on FreeBSD related to getline(3).Bruce A. Mah
2017-11-16Fix some compile-time warnings on macOS (#671)Bruce A. Mah
* Attempt to quiet a warning with print(3) formatting. As a part of this, factor out PRIu64 support / compatibility (added in #664) into a header file and make it more portable by taking into account the size of a long integer. Based on email conversation with: @pprindeville. * Follow-up to pull request #669, fixing compiler warnings on platforms that don't have HAVE_TCP_CONGESTION defined.
2017-11-16Make help and manpage a bit clearer about TOS and DSCP values (#670)Tobias Klausmann
Since iperf3 uses strtol() to parse these values, the user can specify them with 0 prefix for octals and 0x for hex values.
2017-11-14Add missing saved_errno dance around some close(2) calls. (#669)Todd C. Miller
2017-11-14Remove unused functions (#668)Todd C. Miller
Namely, getsock_tcp_mss(), set_tcp_options() and iperf_test_reset(). Also fix a typo in the libiperf manual; iperf_test_reset() was listed instead of iperf_reset_test().
2017-11-13Follow-on to pull-request #665...update manpage and comments.Bruce A. Mah
These reflect support for -A on Windows.
2017-11-13Implemented -A flag for Windows (#665)Boris Okunev
TODO: Need to update some documentation that reflects `-A` is applicable to Windows. @bmah888 to do this.
2017-11-11Remove a few unnecessary headers and unused functions. (#667)Todd C. Miller
* EXIT_SUCCESS and EXIT_FAILURE are defined in stdlib.h, not sysexits.h so no need to include the latter. * No need to include pthread.h. * Remove the no longer used delay() function. This also removes the reliance on nanosleep(). * Remove get_tcp_windowsize() and set_tcp_windowsize() which are unused. These days, iperf uses get/setsockopt() with SO_SNDBUF SO_RCVBUF directly.
2017-11-11Implement daemon(3) for systems that don't have it.Bruce A. Mah
Fixes (and based on a patch in) #369, with some reworking by @bmah888 and @pprindeville.
2017-11-10Add function declaration for our getline() compat implementation.Bruce A. Mah
Should have been a part of #663, which fixes #607.
2017-11-08Regen after merge of #663.Bruce A. Mah
2017-11-08Provide a getline(3) implementation for systems without it. (#663)Bruce A. Mah
The getline(3) implementation comes from NetBSD's file(1) command. This should make compiling work on macOS pre 10.7. Fixes #607.
2017-11-08Fix 3.3 build warnings (#664)Philip Prindeville
* Fix warnings about _GNU_SOURCE being redefined. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> * Fix warnings of format-specified mismatching type Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> * Simplify endianness checks Linux can be built with too many types of C run-time library and it's not reasonable to have to enumerate all of them, especially since at least one of them (MUSL) goes out of its way to not be easily detectable. Instead, leverage autoconf better for Linux/BSD to detect either <endian.h> or <sys/endian.h> directly. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> * Sys headers should not be included directly There's usually a top-level header which then includes the sys/ descendent. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-27Issue #659 (#660)Boris Okunev
Ignore nonsensical TCP MSS when trying to compute the default UDP packet size. This fix seems to be primarily needed for Windows systems, but it's a good bit of sanity checking to do in any case.
2017-10-25Don't overwrite a PID file corresponding to a valid process. (#654)Bruce A. Mah
This fixes a problem described in issue #623 where the PID file opened by a running instance of iperf3 could be overwritten / deleted by a subsequent invocation of iperf3.
2017-10-13Fix memory leak introduced in 1460aa3433769db1f5660e7819b669e5414e9b42. (#652)Bruce A. Mah
Pointed out by: @pprindeville Should have been found by: @bmah888
2017-10-11fix for https://github.com/esnet/iperf/issues/650 (#651)ralcini
Reset authentication token between tests. Fixes #650.
2017-10-11Clear TOS value when resetting test parameters. (#647)Bruce A. Mah
This addresses a problem where the --tos parameter would incorrectly "stick" on the server, causing wrong TOS values to be inserted into packets during --reverse tests. Fixes #639.
2017-10-11Allow the client to pass a duration of 0 to the server. (#648)Bruce A. Mah
Seems to fix #645.
2017-10-04Fix a problem formatting very large numbers. (#642)Bruce A. Mah
Avoid walking off the end of an array when trying to format a number larger than 1000T. Motivated by #641, as reported by @shingchuang, but slightly reimplemented.
2017-10-04Delete outdated commentMalte
This comment became outdated with cba8584b2
2017-09-19Reverse the order of tests for better legibility and logical sense.Bruce A. Mah
Suggested by @pprindeville.
2017-09-18Two fixes for a warning for possibly-too-large UDP packets.Bruce A. Mah
1. Make sure we have a valid TCP MSS on the path when comparing the UDP block size. 2. Fix a redundant "warning". This should fix a bug observed on Windows but not (so far) on any UNIX-like platforms. Fixes #608.
2017-08-14Regen.Bruce A. Mah
2017-08-01Add required RSA header for OpenSSL (#622)Philip Prindeville
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-07-17Fix spelling mistake in manpage.Bruce A. Mah
Fixes #610, pointed out by @borenius-dfn-de.
2017-06-20Greatly expand description section.Bruce A. Mah
Based on text by @eriitguy, fixes #480.
2017-06-12Close ctrl_sck iperf_client_end() (#597)p0intR
This avoids a leak of file descriptors.
2017-06-05Fix a few printf format string warnings seen on macOS / clang. (#593)Bruce A. Mah
2017-06-05Towards issue #278. Don't print small, dataless last intervals. (#592)Bruce A. Mah
This is mostly a cosmetic fix...due to timing differences or interference from data packets, it is possible that the server will have a very small last measurement window, possibly with no data transferred. This looks odd (although it's not incorrect) and we'd like to eliminate these. If there's an interval (presumably it'd be the last measurement interval) less than 10% of the length of a standard measurement/reporting interval, and there are no bytes transferred in the interval, then suppress printing the results and don't add them to the grand total.
2017-06-02Fix out-of-order / loss counting issues with UDP (#457) (#589)Bruce A. Mah
* Towards issue #457. Try to not count the sequence number gaps resulting from out-of-order packets as actual losses. * Put all of the UDP diagnostic output behind the --debug flag.
2017-05-30Fix -F problems (#588)Bruce A. Mah
Attempt to fix some brokenness in -F from #301. In some work related to #125, we introduced a bug in which chunks of a file being read for the -F option were not completely sent, particularly with TCP sockets. We attempt to fix this by detecting cases in which not all data passed to a socket could be actually sent (for example due to full socket buffers) and preserving that data for future send iterations. The ending statistics in the "diskfile" JSON structure were wrong, and did not properly distinguish between sender-side and receiver-side statistics. This has been fixed (at least for the client side). Specifically mention in the manpage that "iperf -F" is not a file transfer tool.
2017-05-30Improve C++ compatibilty (#587)Kenneth Wong
Improve the compatibility of iperf_api.h with C++ so that libiperf can more easily be used with C++ programs. This involves function declarations as extern "C" and inclusion of a couple of more headers (which arguably improves the C use case).
2017-05-24Merge branch 'master' of github.com:esnet/iperfBruce A. Mah
2017-05-24Silence a warning for an unused variable.Bruce A. Mah
2017-05-24Issue 583 (#586)Bruce A. Mah
* s/bandwidth/bitrate/ in user-facing places. Towards #583. iperf3 has long misused terminology; bandwidth is a measure of capacity. iperf3 measures bitrate or throughput. We standardize on "bitrate" because it begins with the same letter as "bandwidth" (to match the -b command-line option). User-facing output mentioning "bandwidth" now uses "bitrate". The long command-line option for -b (--bandwidth) is now --bitrate (--bandwidth is transparently accepted for backward compatibility). A few places in documentation that talk about bandwidth as a measured value have been reworded to use bitrate or throughput. There are a number of places in code where variables are still called "bandwidth". We leave these alone for now. A mention of "bandwidth" in the test parameters JSON also needs to remain unchanged to avoid breaking compatibility. However, the test results JSON never used the term "bandwidth" in the first place. * s/bandwidth/throughput in one place in RPM description. Towards #583.
2017-05-23Fix another compiler warning.Bruce A. Mah
2017-05-23Fix compiler warning with clang.Bruce A. Mah
2017-05-21Return random ascii-string in make_cookie. (#582)Sami Farin
Having hostname and microsecond timestamp in the cookie is not necessary. Also fill test buffer with data from /dev/urandom instead of using random().
2017-05-18Bump manpage date.Bruce A. Mah
2017-05-18clarified a couple optionsBrian Tierney
2017-05-17Issue 216 (#581)Bruce A. Mah
* Add configurable timeout for the setup of the control connection. This is specified using the new --connect-timeout option, with an integer parameter in ms. The iperf3 client will wait for this amount of time for the setup of the control connection to the server. If this option is not given, the OS default for TCP connection setup is used. Specifying a smaller connection timeout allows faster detection of a down / unresponsive iperf3 server. The implementation uses a variation on the timeout_connect() function from OpenBSD's netcat utility. Fixes #216.