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

875 Коммитов

Автор SHA1 Сообщение Дата
Bruce A. Mah
9d7d60aca1 Issue 216 (#581)
* 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.
2017-05-17 12:50:50 -07:00
Bruce A. Mah
f1415a0d98
Add a couple of recently-closed issues to release notes. 2017-05-12 14:14:16 -07:00
Bruce A. Mah
52375c105a Grab TCP PMTU during tests (on Linux only). Towards #569. (#578) 2017-05-12 13:42:50 -07:00
Bruce A. Mah
d54d49c0ac
Don't free memory in uninitialized structures
Also, tighten up the scope/lifetime of some memory structures.

Inspired by #577.
2017-05-12 09:12:48 -07:00
Bruce A. Mah
ec04a41e78
Update release notes for recent progress. 2017-05-11 16:30:49 -07:00
Bruce A. Mah
35ec9e545a Bunch of reporting fixes found while investigating bug #236. (#575)
For the case of multiple TCP streams, compute the grand total
summaries using the appropriate times for the sender and receiver
ends.

Add some divide-by-zero checks.

On the server side, only print the side of the grand total lines
where we have data.  (This follows the behavior of the other
end-of-test output lines.)

Fix a minor (compared to all the other problems) bug with
UDP output printing the wrong ending timestamp.
2017-05-11 14:12:16 -07:00
Bruce A. Mah
8f0d9c47ec
Print the cJSON version in our version info. 2017-05-11 12:31:22 -07:00
Bruce A. Mah
c71712875a Fix NaN in summaries with a client talking to an iperf 3.1/3.0 server.
Recent code changes require the server to send the start and end
timestamps for a test, so that the client can accurately compute
statistics for the sender side of a test.  iperf 3.1 and 3.0
servers won't do this, so if this information isn't passed back
in the results at the end of a test, we fall back to using the
client's timestamps.  The results might not match what's displayed
on the server, but this is basically what iperf 3.1 and earlier
did anyway.

Fixes #574.
2017-05-11 11:40:14 -07:00
Bruce A. Mah
cab5dba86c Import cjson 1.5.2 (#573)
* Import source files for cJSON 1.5.2.

* Portability and 64-bit changes for cJSON.
2017-05-11 10:17:34 -07:00
Bruce A. Mah
e255a12eb9 Fix problems in human-readable UDP output
Keep track of UDP packets sent/received and use appropriately.

We were using the number of UDP packets seen on the server
(regardless of whether it was the sender or receiver) for
computing loss percentages, etc.  This caused confusion in the
case that the last UDP packet doesn't make it to the server
before the test finishes (or if a packet gets lost), because
the client and server had different ideas of how many packets were
sent (OK) and we used the wrong number when computing statistics.

This fix changes the human-readable output to make more sense.
It doesn't change the JSON output.  That needs some more review.
I'm reluctant to make structural changes to the JSON output,
because other programs rely on that format.

We also need to investigate whether the last UDP packet can be
still in flight when the test ends (per hypothesis), and if so
what we should do about this.

We apply similar fixes for human-readable summaries for multi-stream UDP tests.

The fixes are similar to those already done for the stream
summary statistics, but these cover a type of output that's only
done if there is more than one stream.

Adjust the JSON computations / output to do a better job of figuring
out the total number of packets sent.

We really need to disentangle the computation and output formatting,
these two operations shouldn't be mixed together like this.

Fixes #252.
2017-05-09 14:29:22 -07:00
Bruce A. Mah
37d913dfcc Improve error handling and documentation for -f/--format. (#568)
We now reject all invalid format characters given as the
argument to the -f/--format flag.  All valid characters are now
documented in the usage message and manual page.

Towards #566.
2017-05-08 10:01:15 -07:00
Bruce A. Mah
67653543ad
Improve / fix comments regarding UDP jitter calculation.
Internal documentation fix only, no functional change.
2017-05-05 08:59:13 -07:00
Bruce A. Mah
103d4318e8 Fix a heap corruption issue leading to a server-side crash. (#564)
Commit 5ab2132c (PR #551) fixed, among other things, a memory
leak.  The solution, however, causes a hazard where a free() of
an invalid pointer can corrupt the heap.  We've observed this
fairly repeatably while running the test_commands.sh script on
CentOS 7.

To remedy this, we NULL out a pointer after the object it
pointed to has been free-d, just like a number of other similar
objects.
2017-05-04 14:16:42 -07:00
Bruce A. Mah
5abc5f29b7
IRIX 6.5 compatibility, via a patch from @canavan in #368.
Not independently tested.
2017-05-04 09:03:43 -07:00
Bruce A. Mah
cba8584b2d Pacing timer (#563)
* Add --pacing-timer option to allow tuning of -b timers.
These control the granularity of the timer and hence burstiness
of iperf3's sends.  The default is 1ms (1000), which is the default
starting with iperf 3.2.  Follow-on to the commit in #460.

* Update manpage and release notes for --pacing-timer.
2017-05-03 16:18:32 -07:00
Bruce A. Mah
8ab637ab08
Merge branch 'issue-560'
(necessary to get a miscommitted change onto master)
2017-05-03 15:16:14 -07:00
Bruce A. Mah
7d151314d8
Fold in the 3.1.X release notes and begin draft 3.2 release notes. 2017-05-03 14:57:39 -07:00
Bruce A. Mah
e73821cd03 Normalize socket buffer debugging output, put socket buffer sizes in JSON.
These values show up in the start structure as sock_bufsize (requested
size), sndbuf_actual (actual SO_SNDBUF value) and rcvbuf_actual (actual
SO_RCVBUF value).  These values are available for both TCP and UDP.
Both client and server emit these values in their JSON output for their
respective sides, but don't exchange them.

Towards #558.
2017-05-03 14:03:22 -07:00
Bruce A. Mah
246c1bcacd Remove some dead code. 2017-05-03 12:25:32 -07:00
Bruce A. Mah
10e2cc241e Fix various problems with summary statistics (#562)
* Untangle some problems with printing summary statistics.

There were (at least) two problems:

o The server cannot print summary statistics as seen from the
client, because the server has to generate its summaries
before receiving any statistics from the client.  This
shortcoming is somewhat hard-coded into the semantics of
messages on the control channel, and probably can't be easily
changed.

o UDP summary statistics for each stream were ambiguous in that
it wasn't clear whether they were intended to apply to the
sender or receiver.

To fix this, we split UDP summary statistics into two lines,
one for the sender side and one for the receiver side.  This
hopefully eliminates any ambiguity about the statistics.  On the
server, we don't attempt to print the (not very meaningful and
potentially misleading) statistics corresponding to the client.

Possible fix for #560.

* Try to report more accurate ending statistics.

Basically the client side was using only its measured test duration
to compute figures such as bitrate, but the server's test duration
could be different due to network delays/jitter.  So we make sure
that the test durations (for each stream) are passed in the test
results and used appropriately when we print statistics for the
sender and receiver.

Towards #560, also this could help towards #238.

* Silence a warning over an uninitialized variable.
2017-05-03 10:21:34 -07:00
Bruce A. Mah
3f6325cff0 Silence a warning over an uninitialized variable. 2017-05-02 19:36:20 -07:00
Bruce A. Mah
d25e1b78fd
Try to report more accurate ending statistics.
Basically the client side was using only its measured test duration
to compute figures such as bitrate, but the server's test duration
could be different due to network delays/jitter.  So we make sure
that the test durations (for each stream) are passed in the test
results and used appropriately when we print statistics for the
sender and receiver.

Towards #560, also this could help towards #238.
2017-05-02 13:20:31 -07:00
Bruce A. Mah
c8531ca31f
Fix possible integer overflow in tera prefix conversions.
Follow-on commit for #402, possible fix for #561.
2017-05-02 10:21:59 -07:00
Bruce A. Mah
3c6e26a234
Add recent iperf3 update email as a news item. 2017-05-01 16:05:46 -07:00
Bruce A. Mah
faf335bbe9
Fix broken image links in ESnet sphinx theme.
It's been broken for awhile...I'm not sure how it got broken
or why it works after this change.
2017-05-01 16:04:49 -07:00
Bruce A. Mah
f9f6e56cc9
Add an email update sent out last week for reference in gh-pages. 2017-05-01 15:09:14 -07:00
Bruce A. Mah
3021aef828
Untangle some problems with printing summary statistics.
There were (at least) two problems:

o The server cannot print summary statistics as seen from the
client, because the server has to generate its summaries
before receiving any statistics from the client.  This
shortcoming is somewhat hard-coded into the semantics of
messages on the control channel, and probably can't be easily
changed.

o UDP summary statistics for each stream were ambiguous in that
it wasn't clear whether they were intended to apply to the
sender or receiver.

To fix this, we split UDP summary statistics into two lines,
one for the sender side and one for the receiver side.  This
hopefully eliminates any ambiguity about the statistics.  On the
server, we don't attempt to print the (not very meaningful and
potentially misleading) statistics corresponding to the client.

Possible fix for #560.
2017-05-01 14:40:38 -07:00
Bruce A. Mah
65ed04deb5
Fix bug introduced in 03224c9 where we fail on default UDP blocksize.
Fixes #559, follow up to #390..
2017-05-01 09:14:21 -07:00
Bruce A. Mah
7f996b5e98 Print TOS byte value.
It's at the start of the test output for human-readable output, and in
the test_start object in the JSON.

Fixes #226.
2017-04-27 12:47:03 -07:00
Bruce A. Mah
9c033cbf68 Do sanity checks on -w argument as floating point to avoid integer
overflows.  There might be some other places where this applies,
but this commit at least fixes the observed bug.  Fixes #557.
2017-04-27 11:35:56 -07:00
Gabriel Ganne
d1c64c8a36 fix invalid sizeof on pointer instead of type (#556)
This is only a coherency fix since sizeof(char*) >> sizeof(char)
There should be no functional nor stability impact whatsoever
2017-04-26 10:08:53 -07:00
Bruce A. Mah
b9478db947
Fix a problem when getting snd_cwnd on FreeBSD.
On FreeBSD, unlike Linux (and NetBSD?) snd_cwnd is expressed in
octets instead of segments.  Hilarity ensued when we erroneously
multiplied by snd_mss and integer overflows occureed.

Possible fix for #465, #475, #338.  Testing from FreeBSD users
appreciated.
2017-04-22 07:56:31 -07:00
Bruce A. Mah
13ff67e582
Tweaks to the GitHub templates, per discussion with @bltierney. 2017-04-21 13:03:28 -07:00
Bruce A. Mah
b1bc12a209
Minor markup fixes we didn't discover until pushing, sigh. 2017-04-21 09:05:19 -07:00
Bruce A. Mah
c8b6fb5f13
Merge branch 'issue-templates' 2017-04-21 09:01:06 -07:00
Bruce A. Mah
130ca227d9
Try to finish off a first draft of CONTRIBUTING.md. 2017-04-21 08:57:15 -07:00
Bruce A. Mah
89e97f05e0
Manpage fixups. Follow-up to #517. 2017-04-20 17:48:22 -07:00
Bruce A. Mah
92a2498edc
Merge branch 'dmdailey-master'.
This merges pull request #446.
2017-04-20 14:19:24 -07:00
Bruce A. Mah
4dfe721b10
Merge branch 'master' of git://github.com/dmdailey/iperf into dmdailey-master 2017-04-20 14:13:33 -07:00
Gabriel Ganne
5ab2132ce3 warning fixes (#551)
* fix Wstrict-prototypes warnings found by clang

also fix usage_long() call

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix Wunreachable-code-break warnings found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix Wshadow warnings found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix Wmissing-noreturn warning found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* ix memory leak found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix Wmisleading-indentation warnings raised by gcc-6

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix warning: Value stored to 'ptr' during its initialization is never read found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix warning: The left operand of '>' is a garbage value found by clang

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

* fix memory leak in global cleanup

Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-04-20 13:33:15 -07:00
Bruce A. Mah
5e52a8460b
Regen. 2017-04-20 12:38:18 -07:00
Bruce A. Mah
a026b29b2f
Move an autoconfig file into config/, get rid of a no-longer-used file.
Follow-up for #517.
2017-04-20 12:37:09 -07:00
Bruce A. Mah
02d411cb02
Fix some help text. Add authentication as a feature in --version.
Follow-up to #517.
2017-04-20 12:26:39 -07:00
asavah
ac2604dda8 fix missing source files in src/Makefile.am (#554)
Follow-up fix for #517.
2017-04-20 12:09:44 -07:00
ralcini
a51045de19 Service Authentication (#517)
Add an optional mode that requires clients to authenticate with the server.

In this mode, clients need to provide a username and a password, which are checked against a password file on the server.  The authentication credentials are protected by an RSA public keypair...the encrypted credentials are sent along with the test parameters.

Operationally the use of this feature places the following additional requirements on the build and installation of iperf3:

o The presence of the OpenSSL headers and libraries to build iperf3, and the libraries available on the client and server at runtime.

o Generation of an RSA public keypair; the private part is used by the server and the public part must be distributed to the clients.

o Username/password pairs for all authorized users, to be stored in a file on the server.

o Loose time synchronization between the server and clients (to within approximately 30 seconds).

o Appropriate command-line flags given on the client and server.

Note that iperf3 can be built and run as before, without fulfilling any of these requirements.

Partial documentation for this feature is included in this commit.  It is anticipated that additional documentation text and editing will follow this merge.

Submitted by @ralcini.  First suggested by @codyhanson in pull request #242.
2017-04-20 10:01:08 -07:00
Bruce A. Mah
aee0b7417a
Commit WIP of GitHub issue templates. 2017-04-20 09:27:02 -07:00
Bruce A. Mah
05600c201a
Minor follow-ups to #508.
Change the internal command-line option code for --dscp from the literal
'5' to a constant defined as OPT_DSCP.

Add manpage text for --dscp option.

Tweak help text for --dscp (while here, fix problem in --tos text).
2017-04-14 13:44:32 -07:00
Bruce A. Mah
a68712c7a8
Regen, follow up to #508. 2017-04-14 13:29:25 -07:00
Dave Täht
97c95c3be2 add support for specifying --dscp symbolically and numerically (#508)
Using a command line adding dscp (instead of tos) you can:

--dscp EF,CS1,etc.
--dscp 0x08
--dscp 63

These will provide the correct shifted left 2 tos value for these, and
for people that think in terms of dscp values, this is a goodness.

Having this option available lets an enduser clearly distinguish between
an old version of iperf with a non-working --tos facility, vs a
version where it works, with something saner that lets just specify
the dscp.

I did not come up with a good -? option for it, and used -5 internally.
2017-04-14 13:27:18 -07:00
Bruce A. Mah
e9e2d6d19c
Add support for tera- prefix [Tt] in input and output.
Also add some more unit tests for this and prune unused code
from unit test program.

Fixes #402.
2017-04-14 13:14:44 -07:00