1
1
Граф коммитов

1127 Коммитов

Автор SHA1 Сообщение Дата
Tamir Duberstein
120b7efee9
fix: include iperf_util.h in main.c (#954)
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-17 13:58:49 -07:00
Bruce A. Mah
cfcfabf5d7
fix(cygwin): Fix compile error where CPU_SETSIZE isn't defined. (#948)
Based on a fix from @RomelSan.

Fixes #944.
2020-03-17 13:51:07 -07:00
Bruce A. Mah
6f5512e631
docs: Follow-up to #959, more copyright year bumps. 2020-02-21 14:17:05 -08:00
Joe Karlsson
2782d2a420
Updated Copyright year to 2020 (#959) 2020-02-21 14:08:23 -08:00
Oleh Yudin
bb115306f8 Fix memory leaks for RSA key setters (#949)
Originally discussed in #940.
2020-01-06 16:33:06 -08:00
Bruce A. Mah
4a3efb37da
build: Unbreak builds on macOS by not building profiled binaries by default (#950)
Fixes #933.
2020-01-06 13:43:29 -08:00
Xiang Xiao
4e9a30bba3
fix cjson warning: "true" and "false redefined
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-03 13:47:44 -08:00
Xiang Xiao
6343986796
ensure build_tcpinfo_message TCP_INFO check consistent with 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-03 09:07:03 -08:00
Xiang Xiao
666040bd79
fix hotn?, strcasecmp and timeval isn't defined error
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-02 15:58:20 -08:00
Xiang Xiao
0eb370de2e
check SIGINT/SIGTERM/SIGHUP defined before using them
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-02 15:54:19 -08:00
Xiang Xiao
407a5ba84c
fix warning: "HAVE_NETINET_IN_SYSTM_H"/"HAVE_NETINET_IP_H" is not defined
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-02 13:19:30 -08:00
Xiang Xiao
a0af1e68c8
change some file mode from 100755 to 100644
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>
2020-01-02 13:16:47 -08:00
Bruce A. Mah
a294bd4ce7
fix: Copy some strings passed as API parameters for consistency with CLI. (#943)
Fixes #939.
2019-12-20 15:39:26 -08:00
Bruce A. Mah
79e1cd35b5
fix: Make prototype for iperf_set_test_extra_data() match its definition.
Fixes #938.
2019-12-20 21:57:47 +00:00
wallyatgithub
02a5f47558 add window size support for sctp (#926) 2019-11-01 12:10:15 -07:00
bobobo1618
b95a580f0c Add (extremely) minimal Dockerfile (#824) 2019-10-18 14:14:51 -07:00
Ondrej Lichtner
80353b0ada fix: fix burst mode throttle checking (#898)
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-01 16:55:14 -07:00
Allen Flickinger
22da02dcfb enh: Add server authentication API functions (#911) 2019-10-01 13:28:38 -07:00
Bruce A. Mah
60e9b84624
Chore: Regen. 2019-08-19 14:40:12 -07:00
Bruce A. Mah
504ed7a2e3
chore: Post-release version number bump. 2019-08-19 14:39:14 -07:00
Sergey Nemov
9c69a85088 fix: Fix a bug in --bidir option processing (#903)
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-08-19 14:29:27 -07:00
Bruce A. Mah
d0d77e9519
doc: Fix error in domain name for mailing list. 2019-06-28 16:32:13 -07:00
Bruce A. Mah
c47e43d5a3
doc: Document --bidir option in manpage. (#893)
Fixes #890.
2019-06-24 17:37:32 -07:00
Bruce A. Mah
dd0e309305
docs: Fix date in 3.7 release item.
Fixes #892.
2019-06-24 12:39:45 -07:00
Bruce A. Mah
2a7847a081
docs: Bump version number in documentation. 2019-06-21 15:58:40 -07:00
Bruce A. Mah
6e6f0daf2c
doc: News update for iperf-3.7. 2019-06-21 13:49:08 -07:00
Bruce A. Mah
dfcea9f6a0
chore: iperf-3.7 release engineering tasks.
Bump version number, update release notes, rename release notes and tweak
markup.
2019-06-20 18:12:47 -07:00
Bruce A. Mah
38bac802fa
fix: Emit appropriate error messages from getaddrinfo(3). (#888)
* fix: Emit appropriate error messages from getaddrinfo(3).

This fixes an omission likely caused when switching resolver
library calls.  Fixes #846.
2019-06-18 16:03:21 -07:00
Bruce A. Mah
c4bd56f373
fix: Fix off-by-one memory overwrite crash and memory leaks (#887)
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-18 15:11:32 -07:00
Andrew Cooks
098dd3cc1b
delay tearing down tcp control connections
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-14 11:38:54 -07:00
Bruce A. Mah
6c7834629a
Fix: Don't allow --port 0 or other invalid values. (#885)
* Fix:  Don't allow --port or --cport to take 0 or other invalid values.

Fixes #884.
2019-06-14 11:21:15 -07:00
srgnk
255a9c7110 enh: Introduce iperf_set_test_logfile API function (#871)
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.
2019-06-05 16:08:17 -07:00
Bruce A. Mah
fd46367fc4
feat: Authentication failure doesn't count for --one-off. (#877)
Fixes #864.
2019-06-05 15:54:22 -07:00
srgnk
2679640c0f fix: Don't print spurious JSON server output in bidir mode (#868)
In bidirectional mode, if option --get-server-output is set and if
both client and server have --json set to true, client would still print
the json output of server to stdout as a separate piece instead of
including it into client's json output.

This patch fixes this problem, the server's json output would be
appended to client's json field 'server_output_json' as it should be.
2019-05-28 12:02:07 -07:00
Bruce A. Mah
0891322aad
chore: Slightly belatedly update copyright dates. 2019-05-24 13:57:01 -07:00
Bruce A. Mah
7c9b553c7d
enh: Properly include <sys/socket.h> for improved portability. (#874)
Fixes #821.
2019-05-17 14:14:05 -07:00
srgnk
a9af2b5127 enh: Introduce API functions for no_delay option (#870) 2019-05-17 13:39:40 -07:00
srgnk
8fc10fa34b enh: Introduce API functions for repeating_payload option (#869) 2019-05-17 13:38:58 -07:00
srgnk
e9e984de2b fix: Pass repeating_payload option to server (#867)
If client was started with --repeating-payload option, tell the
server to use the repeating_payload also.

Since repeating_payload is a client specific option at the moment and
we don't tell the server if repeating_payload was set not not,
server always uses randomized patterns in reverse and bidirectional
modes disregarding what patterns the client was told to generate.

So, if client was started with both --repeating-payload and --reverse,
the server would still send the randomized data to the client which
doesn't seem right.

This commit fixes this issue.

Signed-off-by: Sergey Nemov <sergey.nemov@intel.com>
2019-05-17 13:21:31 -07:00
Bruce A. Mah
99fa7cbeec
Regen. 2019-05-17 12:50:01 -07:00
hhb
f78171452b fix: Fix configure when openssl is absent. (#854)
openssl flags was appended to normal cpp/ld flags even if it is
absent. This change fixes configure.ac and regenerates configure.
2019-05-17 12:46:28 -07:00
Bruce A. Mah
c9bb46938c
Partially revert documentated added in 0c4d599 to reflect reality. (#866)
The bug reported in #505 seems to not exist at this time, and
the text added in this manpage change caused some other problems,
a la perfsonar/pscheduler#819.

Fixes #860.
2019-05-14 14:41:22 -07:00
Bruce A. Mah
61b82c0b25
fix: Use timezone from time formatting, not a (wrong) hardcoded string. (#857)
Fixes #838.
2019-04-12 17:21:19 -04:00
Bruce A. Mah
8b9c59b3ec
fix: Remove Linux-ism in clock_gettime(3). (#853)
Fixes build on FreeBSD.  Possible fix for #829.
2019-03-29 15:52:56 -07:00
Matt Pelland
40e7c05440 implement providing password via environment variable (#815) 2019-02-01 14:39:43 -08:00
Tommi Rantala
d607579929 Fix cpu usage calculation regression in cpu_util() (#822)
iperf reported "impossible" CPU usage percentages in JSON output:

    "cpu_utilization_percent":      {
        "host_total":   70907445.679701567,
        "host_user":    1303335.9336584355,
        "host_system":  69604109.746043131,
        "remote_total": 13580675.258652203,
        "remote_user":  540984.0827233647,
        "remote_system":        13039620.331720918
    },

Regression introduced in commit cde81d7 ("Add initial portable time
abstraction"), where "timediff" was accidentally changed from
microseconds to seconds:

  -    timediff = ((temp.tv_sec * 1000000.0 + temp.tv_usec) -
  -                (last.tv_sec * 1000000.0 + last.tv_usec));
  +    iperf_time_diff(&now, &last, &temp_time);
  +    timediff = iperf_time_in_secs(&temp_time);
2018-12-13 13:43:02 -08:00
Frank LENORMAND
901ad59c83 tcp sctp: Let the system pick the largest possible backlog value for listen() (#827)
This commit applies the same changes made by b481169 (#693), to the
TCP and SCTP server sockets.
2018-12-13 13:32:49 -08:00
Boris Okunev
0778f04c98 Bidirect mode implementation (#780)
Adds the `--bidir` flag to support simultaneous two-way tests.

Submitted by @LikHait.  Fixes #201.
2018-12-13 12:59:02 -08:00
Bruce A. Mah
a68171340f
Add portable time abstraction (#738). Fixes #253.
From author's notes (@ben-foxmore):

The current usage of gettimeofday causes issues for us when performing
tests shortly after restarting a system. In our setup, this occurs
often as we restart the system before each test to ensure reliable
results. We already maintain our own version of iperf for some subtle
changes, but this change feels like it might be useful to upstream.
(It's also a reasonable size change, so we'd prefer not maintain it
with each new version of iperf.)

It uses clock_gettime on systems that have it available, and falls
back to gettimeofday when it's not. These two options use different
structures for storing time - clock_gettime uses timespec, and
gettimeofday uses timeval. To provide abstraction to which one is
available, a separate iperf_time struct is defined to store time.

timespec has nanosecond accuracy, while timeval only has microseconds.
For the purposes of iperf, I don't think nanosecond accuracy is
neccesary, so iperf_time only uses microseconds, throwing away any
additional accuracy. Currently I have used the MONOTONIC clock, as I
think we only need a consistent time interval measure.
2018-09-28 11:24:12 -07:00
Bruce A. Mah
64d1be0fcc
Regen. 2018-09-28 11:07:28 -07:00