Hello community, here is the log from the commit of package iperf for openSUSE:Factory checked in at 2018-07-09 13:29:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iperf (Old) and /work/SRC/openSUSE:Factory/.iperf.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iperf" Mon Jul 9 13:29:21 2018 rev:26 rq:621382 version:3.6 Changes: -------- --- /work/SRC/openSUSE:Factory/iperf/iperf.changes 2018-03-16 10:44:51.693205609 +0100 +++ /work/SRC/openSUSE:Factory/.iperf.new/iperf.changes 2018-07-09 13:30:58.902534031 +0200 @@ -1,0 +2,16 @@ +Fri Jul 6 07:22:31 UTC 2018 - lie...@rz.uni-mannheim.de + +- update to 3.6 + * A new --extra-data option can be used to fill in a user-defined + string field that appears in JSON output. + * A new --repeating-payload option makes iperf3 use a payload pattern + similar to that used by iperf2, which could help in recreating + results that might be affected by payload entropy (for example, + compression). + * -B now works properly with SCTP tests. + * A compile fix for Solaris 10 was added. + * Some minor bug fixes for JSON output. In particular, warnings for + debug and/or verbose modes with --json output and a fix for + JSON output on CentOS 6 + +------------------------------------------------------------------- Old: ---- iperf-3.5.tar.gz New: ---- iperf-3.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iperf.spec ++++++ --- /var/tmp/diff_new_pack.ATIdCR/_old 2018-07-09 13:30:59.418532991 +0200 +++ /var/tmp/diff_new_pack.ATIdCR/_new 2018-07-09 13:30:59.422532983 +0200 @@ -1,7 +1,7 @@ # # spec file for package iperf # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define soname 0 Name: iperf -Version: 3.5 +Version: 3.6 Release: 0 Summary: A tool to measure network performance License: BSD-3-Clause ++++++ iperf-3.5.tar.gz -> iperf-3.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/Makefile.in new/iperf-3.6/Makefile.in --- old/iperf-3.5/Makefile.in 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/Makefile.in 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/README.md new/iperf-3.6/README.md --- old/iperf-3.5/README.md 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/README.md 2018-06-22 23:20:47.000000000 +0200 @@ -26,7 +26,7 @@ iperf3 is principally developed by ESnet / Lawrence Berkeley National Laboratory. It is released under a three-clause BSD license. -For more information see: http://software.es.net/iperf +For more information see: https://software.es.net/iperf Source code and issue tracker: https://github.com/esnet/iperf @@ -35,7 +35,7 @@ Downloads of iperf3 are available at: - http://downloads.es.net/pub/iperf/ + https://downloads.es.net/pub/iperf/ To check out the most recent code, clone the git repository at: @@ -146,7 +146,7 @@ A set of known issues is maintained on the iperf3 Web pages: -http://software.es.net/iperf/dev.html#known-issues +https://software.es.net/iperf/dev.html#known-issues Links ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/RELEASE_NOTES new/iperf-3.6/RELEASE_NOTES --- old/iperf-3.5/RELEASE_NOTES 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/RELEASE_NOTES 2018-06-22 23:20:47.000000000 +0200 @@ -1,3 +1,34 @@ +== iperf 3.6 2018-06-25 == + +* Notable user-visible changes + + * A new --extra-data option can be used to fill in a user-defined + string field that appears in JSON output. (#600 / #729) + + * A new --repeating-payload option makes iperf3 use a payload pattern + similar to that used by iperf2, which could help in recreating + results that might be affected by payload entropy (for example, + compression). (#726) + + * -B now works properly with SCTP tests. (#678 / #715) + + * A compile fix for Solaris 10 was added. (#711) + + * Some minor bug fixes for JSON output. In particular, warnings for + debug and/or verbose modes with --json output (#737) and a fix for + JSON output on CentOS 6 (#727 / #744). + + * software.es.net and downloads.es.net now support HTTPS, so URLs in + documentation that refer to those two hosts now use https:// + instead of http:// URLs. (#759) + +* Notable developer-visible changes + + * Functions related to authenticated iperf3 connections have been + exposed via libiperf. (#712 / #713) + + * The ToS byte is now exposed in the libiperf API. (#719) + == iperf 3.5 2018-03-02 == * Notable user-visible changes @@ -10,8 +41,6 @@ paths. Many thanks to @FuzzyStatic for providing access to a test environment for diagnosing this issue (#692). -* Notable developer-visible changes - == iperf 3.4 2018-02-14 == * Notable user-visible changes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/aclocal.m4 new/iperf-3.6/aclocal.m4 --- old/iperf-3.5/aclocal.m4 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/aclocal.m4 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.16 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. @@ -9064,7 +9064,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -9080,7 +9080,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/config/compile new/iperf-3.6/config/compile --- old/iperf-3.5/config/compile 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/config/compile 2018-06-22 23:20:47.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2017-09-16.17; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. @@ -340,7 +340,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/config/depcomp new/iperf-3.6/config/depcomp --- old/iperf-3.5/config/depcomp 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/config/depcomp 2018-06-22 23:20:47.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2017-09-16.17; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 Free Software Foundation, Inc. @@ -783,7 +783,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/config/missing new/iperf-3.6/config/missing --- old/iperf-3.5/config/missing 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/config/missing 2018-06-22 23:20:47.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2018-01-04.22; # UTC +scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. @@ -207,7 +207,7 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/configure new/iperf-3.6/configure --- old/iperf-3.5/configure 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/configure 2018-06-22 23:20:47.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for iperf 3.5. +# Generated by GNU Autoconf 2.69 for iperf 3.6. # # Report bugs to <https://github.com/esnet/iperf>. # @@ -590,10 +590,10 @@ # Identity of this package. PACKAGE_NAME='iperf' PACKAGE_TARNAME='iperf' -PACKAGE_VERSION='3.5' -PACKAGE_STRING='iperf 3.5' +PACKAGE_VERSION='3.6' +PACKAGE_STRING='iperf 3.6' PACKAGE_BUGREPORT='https://github.com/esnet/iperf' -PACKAGE_URL='http://software.es.net/iperf/' +PACKAGE_URL='https://software.es.net/iperf/' # Factoring default headers for most tests. ac_includes_default="\ @@ -1321,7 +1321,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures iperf 3.5 to adapt to many kinds of systems. +\`configure' configures iperf 3.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1391,7 +1391,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of iperf 3.5:";; + short | recursive ) echo "Configuration of iperf 3.6:";; esac cat <<\_ACEOF @@ -1443,7 +1443,7 @@ it to find libraries and programs with nonstandard names/locations. Report bugs to <https://github.com/esnet/iperf>. -iperf home page: <http://software.es.net/iperf/>. +iperf home page: <https://software.es.net/iperf/>. _ACEOF ac_status=$? fi @@ -1506,7 +1506,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -iperf configure 3.5 +iperf configure 3.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1875,7 +1875,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by iperf $as_me 3.5, which was +It was created by iperf $as_me 3.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2807,7 +2807,7 @@ # Define the identity of the package. PACKAGE='iperf' - VERSION='3.5' + VERSION='3.6' cat >>confdefs.h <<_ACEOF @@ -13626,7 +13626,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by iperf $as_me 3.5, which was +This file was extended by iperf $as_me 3.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13687,13 +13687,13 @@ $config_commands Report bugs to <https://github.com/esnet/iperf>. -iperf home page: <http://software.es.net/iperf/>." +iperf home page: <https://software.es.net/iperf/>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -iperf config.status 3.5 +iperf config.status 3.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/configure.ac new/iperf-3.6/configure.ac --- old/iperf-3.5/configure.ac 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/configure.ac 2018-06-22 23:20:47.000000000 +0200 @@ -24,7 +24,7 @@ # file for complete information. # Initialize the autoconf system for the specified tool, version and mailing list -AC_INIT(iperf, 3.5, https://github.com/esnet/iperf, iperf, http://software.es.net/iperf/) +AC_INIT(iperf, 3.6, https://github.com/esnet/iperf, iperf, https://software.es.net/iperf/) m4_include([config/ax_check_openssl.m4]) AC_LANG(C) Binary files old/iperf-3.5/docs/_esnet/static/ESnet_Final_Logos_All_Blue_Circle_Stamp_RGB.png and new/iperf-3.6/docs/_esnet/static/ESnet_Final_Logos_All_Blue_Circle_Stamp_RGB.png differ Binary files old/iperf-3.5/docs/_esnet/static/favicon.ico and new/iperf-3.6/docs/_esnet/static/favicon.ico differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/_esnet/templates/layout.html new/iperf-3.6/docs/_esnet/templates/layout.html --- old/iperf-3.5/docs/_esnet/templates/layout.html 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/_esnet/templates/layout.html 2018-06-22 23:20:47.000000000 +0200 @@ -102,7 +102,7 @@ <div class="container"> <div class="row"> <div class="col-md-1"> - <a href="http://www.es.net/"><img src="_static/logo-esnet.png" alt="[ESnet]"></a> + <a href="http://www.es.net/"><img src="_static/ESnet_Final_Logos_All_Blue_Circle_Stamp_RGB.png" alt="[ESnet]"></a> </div> <div class="col-md-11"> <p class="pull-right"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/conf.py new/iperf-3.6/docs/conf.py --- old/iperf-3.5/docs/conf.py 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/conf.py 2018-06-22 23:20:47.000000000 +0200 @@ -52,10 +52,10 @@ # built documents. # # The short X.Y version. -version = '3.4' +version = '3.5' # The full version, including alpha/beta/rc tags. -release = '3.4' +release = '3.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -128,7 +128,7 @@ # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = "_esnet/static/logo-esnet-ball-sm.png" +html_logo = "_esnet/static/ESnet_Final_Logos_All_Blue_Circle_Stamp_RGB.png" # The name of an image file (within the static path) to use as favicon of the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/faq.rst new/iperf-3.6/docs/faq.rst --- old/iperf-3.5/docs/faq.rst 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/faq.rst 2018-06-22 23:20:47.000000000 +0200 @@ -70,6 +70,40 @@ It appears that for FreeBSD (tested on FreeBSD 11.1-RELEASE), only the last two steps are needed to produce a static executable. +How can I build on a system that doesn't support profiled executables? + This problem has been noted by users attempting to build iperf3 for + Android systems. There are three workarounds. In order from least + effort to most effort: + + #. At the time the linking of the iperf3 profiled executable fails, + the "normal" iperf3 executable is probably already created. So if + you are willing to accept the error exit from the make process + (and a little bit of wasted work on the build host), you might + not need to do anything. + + #. After the configure step, there will be a definition in + ``src/Makefile`` that looks like this:: + + noinst_PROGRAMS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) \ + iperf3_profile$(EXEEXT) + + If you edit it to look like this, it will disable the build of the profiled iperf3:: + + noinst_PROGRAMS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) + + #. Similar to item 2 above, but more permanent...if you edit + ``src/Makefile.am`` and change the line reading like this:: + + noinst_PROGRAMS = t_timer t_units t_uuid iperf3_profile + + To look like this:: + + noinst_PROGRAMS = t_timer t_units t_uuid + + And then run ``./bootstrap.sh``, that will regenerate the project + Makefiles to make the exclusion of the profiled iperf3 executable + permanant (within that source tree). + I'm seeing quite a bit of unexpected UDP loss. Why? First, confirm you are using iperf 3.1.5 or higher. There was an issue with the default UDP send size that was fixed in @@ -85,6 +119,10 @@ modules, which must be loaded before they can be used):: /sbin/sysctl net.ipv4.tcp_available_congestion_control + + On FreeBSD, the equivalent command is:: + + /sbin/sysctl net.inet.tcp.cc.available I’m using the ``--logfile`` option. How do I see file output in real time? Use the ``--forceflush`` flag. @@ -113,8 +151,8 @@ I'm trying to use iperf3 to test a 40G/100G link...What do I need to know? See the following pages on fasterdata.es.net: - - https://fasterdata.es.net/host-tuning/100g-tuning/ - - https://fasterdata.es.net/performance-testing/network-troubleshooting-tools/iperf/multi-stream-iperf3/ + - https://fasterdata.es.net/host-tuning/100g-tuning/ + - https://fasterdata.es.net/performance-testing/network-troubleshooting-tools/iperf/multi-stream-iperf3/ My receiver didn't get all the bytes that got sent but there was no loss. Huh? iperf3 uses a control connection between the client and server to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/index.rst new/iperf-3.6/docs/index.rst --- old/iperf-3.5/docs/index.rst 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/index.rst 2018-06-22 23:20:47.000000000 +0200 @@ -41,13 +41,13 @@ ----------------------- Project homepage and documentation hosted on GitHub Pages: -http://software.es.net/iperf/ +https://software.es.net/iperf/ Project site (source code repository, issue tracker) hosted on GitHub: https://github.com/esnet/iperf Source code downloads: -http://downloads.es.net/pub/iperf/ +https://downloads.es.net/pub/iperf/ Contents -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/invoking.rst new/iperf-3.6/docs/invoking.rst --- old/iperf-3.5/docs/invoking.rst 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/invoking.rst 2018-06-22 23:20:47.000000000 +0200 @@ -156,9 +156,9 @@ potentialy multiple CPUs). -B, --bind host - bind to the specific interface associated with address <host>. - If the host has multiple interfaces, it will use the first - interface by default. + bind to the specific interface associated with address host. If + the host has multiple interfaces, it will use the first inter- + face by default. -V, --verbose give more detailed output @@ -170,11 +170,11 @@ send output to a log file. --forceflush - force flushing output at every interval. Used to avoid buffer- + force flushing output at every interval. Used to avoid buffer- ing when sending output to pipe. -d, --debug - emit debugging output. Primarily (perhaps exclusively) of use + emit debugging output. Primarily (perhaps exclusively) of use to developers. -v, --version @@ -192,28 +192,28 @@ run the server in background as a daemon -I, --pidfile file - write a file with the process ID, most useful when running as a + write a file with the process ID, most useful when running as a daemon. -1, --one-off handle one client connection, then exit. --rsa-private-key-path file - path to the RSA private key (not password-protected) used to - decrypt authentication credentials from the client (if built + path to the RSA private key (not password-protected) used to + decrypt authentication credentials from the client (if built with OpenSSL support). --authorized-users-path file - path to the configuration file containing authorized users cre- - dentials to run iperf tests (if built with OpenSSL support). - The file is a comma separated list of usernames and password - hashes; more information on the structure of the file can be + path to the configuration file containing authorized users cre- + dentials to run iperf tests (if built with OpenSSL support). + The file is a comma separated list of usernames and password + hashes; more information on the structure of the file can be found in the EXAMPLES section. CLIENT SPECIFIC OPTIONS -c, --client host - run in client mode, connecting to the specified server. By - default, a test consists of sending data from the client to the + run in client mode, connecting to the specified server. By + default, a test consists of sending data from the client to the server, unless the -R flag is specified. --sctp use SCTP rather than TCP (FreeBSD and Linux) @@ -222,42 +222,42 @@ use UDP rather than TCP --connect-timeout n - set timeout for establishing the initial control connection to - the server, in milliseconds. The default behavior is the oper- - ating system's timeout for TCP connection establishment. Pro- - viding a shorter value may speed up detection of a down iperf3 + set timeout for establishing the initial control connection to + the server, in milliseconds. The default behavior is the oper- + ating system's timeout for TCP connection establishment. Pro- + viding a shorter value may speed up detection of a down iperf3 server. -b, --bitrate n[KM] - set target bitrate to n bits/sec (default 1 Mbit/sec for UDP, - unlimited for TCP/SCTP). If there are multiple streams (-P - flag), the throughput limit is applied separately to each - stream. You can also add a '/' and a number to the bitrate + set target bitrate to n bits/sec (default 1 Mbit/sec for UDP, + unlimited for TCP/SCTP). If there are multiple streams (-P + flag), the throughput limit is applied separately to each + stream. You can also add a '/' and a number to the bitrate specifier. This is called "burst mode". It will send the given - number of packets without pausing, even if that temporarily - exceeds the specified throughput limit. Setting the target - bitrate to 0 will disable bitrate limits (particularly useful + number of packets without pausing, even if that temporarily + exceeds the specified throughput limit. Setting the target + bitrate to 0 will disable bitrate limits (particularly useful for UDP tests). This throughput limit is implemented internally - inside iperf3, and is available on all platforms. Compare with - the --fq-rate flag. This option replaces the --bandwidth flag, + inside iperf3, and is available on all platforms. Compare with + the --fq-rate flag. This option replaces the --bandwidth flag, which is now deprecated but (at least for now) still accepted. --pacing-timer n[KMG] - set pacing timer interval in microseconds (default 1000 - microseconds, or 1 ms). This controls iperf3's internal pacing - timer for the -b/--bitrate option. The timer fires at the - interval set by this parameter. Smaller values of the pacing - timer parameter smooth out the traffic emitted by iperf3, but - potentially at the cost of performance due to more frequent + set pacing timer interval in microseconds (default 1000 + microseconds, or 1 ms). This controls iperf3's internal pacing + timer for the -b/--bitrate option. The timer fires at the + interval set by this parameter. Smaller values of the pacing + timer parameter smooth out the traffic emitted by iperf3, but + potentially at the cost of performance due to more frequent timer processing. --fq-rate n[KM] Set a rate to be used with fair-queueing based socket-level pac- - ing, in bits per second. This pacing (if specified) will be in - addition to any pacing due to iperf3's internal throughput pac- - ing (-b/--bitrate flag), and both can be specified for the same - test. Only available on platforms supporting the SO_MAX_PAC- - ING_RATE socket option (currently only Linux). The default is + ing, in bits per second. This pacing (if specified) will be in + addition to any pacing due to iperf3's internal throughput pac- + ing (-b/--bitrate flag), and both can be specified for the same + test. Only available on platforms supporting the SO_MAX_PAC- + ING_RATE socket option (currently only Linux). The default is no fair-queueing based pacing. --no-fq-socket-pacing @@ -274,27 +274,27 @@ number of blocks (packets) to transmit (instead of -t or -n) -l, --length n[KM] - length of buffer to read or write. For TCP tests, the default + length of buffer to read or write. For TCP tests, the default value is 128KB. In the case of UDP, iperf3 tries to dynamically - determine a reasonable sending size based on the path MTU; if - that cannot be determined it uses 1460 bytes as a sending size. + determine a reasonable sending size based on the path MTU; if + that cannot be determined it uses 1460 bytes as a sending size. For SCTP tests, the default size is 64KB. --cport port - bind data streams to a specific client port (for TCP and UDP + bind data streams to a specific client port (for TCP and UDP only, default is to use an ephemeral port) -P, --parallel n - number of parallel client streams to run. Note that iperf3 is - single threaded, so if you are CPU bound, this will not yield + number of parallel client streams to run. Note that iperf3 is + single threaded, so if you are CPU bound, this will not yield higher throughput. -R, --reverse - reverse the direction of a test, so that the server sends data + reverse the direction of a test, so that the server sends data to the client -w, --window n[KM] - window size / socket buffer size (this gets sent to the server + window size / socket buffer size (this gets sent to the server and used on that side too) -M, --set-mss n @@ -314,32 +314,32 @@ can be used, i.e. 52, 064 and 0x34 all specify the same value. --dscp dscp - set the IP DSCP bits. Both numeric and symbolic values are - accepted. Numeric values can be specified in decimal, octal and + set the IP DSCP bits. Both numeric and symbolic values are + accepted. Numeric values can be specified in decimal, octal and hex (see --tos above). -L, --flowlabel n set the IPv6 flow label (currently only supported on Linux) -X, --xbind name - Bind SCTP associations to a specific subset of links using - sctp_bindx(3). The --B flag will be ignored if this flag is + Bind SCTP associations to a specific subset of links using + sctp_bindx(3). The --B flag will be ignored if this flag is specified. Normally SCTP will include the protocol addresses of - all active links on the local host when setting up an associa- - tion. Specifying at least one --X name will disable this behav- - iour. This flag must be specified for each link to be included - in the association, and is supported for both iperf servers and + all active links on the local host when setting up an associa- + tion. Specifying at least one --X name will disable this behav- + iour. This flag must be specified for each link to be included + in the association, and is supported for both iperf servers and clients (the latter are supported by passing the first --X argu- - ment to bind(2)). Hostnames are accepted as arguments and are - resolved using getaddrinfo(3). If the --4 or --6 flags are - specified, names which do not resolve to addresses within the + ment to bind(2)). Hostnames are accepted as arguments and are + resolved using getaddrinfo(3). If the --4 or --6 flags are + specified, names which do not resolve to addresses within the specified protocol family will be ignored. --nstreams n Set number of SCTP streams. -Z, --zerocopy - Use a "zero copy" method of sending data, such as sendfile(2), + Use a "zero copy" method of sending data, such as sendfile(2), instead of the usual write(2). -O, --omit n @@ -350,16 +350,16 @@ Prefix every output line with this string. -C, --congestion algo - Set the congestion control algorithm (Linux and FreeBSD only). - An older --linux-congestion synonym for this flag is accepted + Set the congestion control algorithm (Linux and FreeBSD only). + An older --linux-congestion synonym for this flag is accepted but is deprecated. --get-server-output Get the output from the server. The output format is determined by the server (in particular, if the server was invoked with the - --json flag, the output will be in JSON format, otherwise it - will be in human-readable format). If the client is run with - --json, the server output is included in a JSON object; other- + --json flag, the output will be in JSON format, otherwise it + will be in human-readable format). If the client is run with + --json, the server output is included in a JSON object; other- wise it is appended at the bottom of the human-readable output. --username username @@ -368,7 +368,7 @@ actively when the test is run. --rsa-public-key-path file - path to the RSA public key used to encrypt authentication cre- + path to the RSA public key used to encrypt authentication cre- dentials (if built with OpenSSL support) @@ -376,8 +376,8 @@ Authentication - RSA Keypair The authentication feature of requires an RSA public keypair. The pub- lic key is used to encrypt the authentication token containing the user - credentials, while the private key is used to decrypt the authentica- - tion token. An example of a set of UNIX/Linux commands to generate + credentials, while the private key is used to decrypt the authentica- + tion token. An example of a set of UNIX/Linux commands to generate correct keypair follows: > openssl genrsa -des3 -out private.pem 2048 @@ -386,16 +386,16 @@ form PEM After these commands, the public key will be contained in the file pub- - lic.pem and the private key will be contained in the file pri- + lic.pem and the private key will be contained in the file pri- vate_not_protected.pem. Authentication - Authorized users configuration file - A simple plaintext file must be provided to the iperf3 server in order - to specify the authorized user credentials. The file is a simple list - of comma-separated pairs of a username and a corresponding password - hash. The password hash is a SHA256 hash of the string "{$user}$pass- - word". The file can also contain commented lines (starting with the # - character). An example of commands to generate the password hash on a + A simple plaintext file must be provided to the iperf3 server in order + to specify the authorized user credentials. The file is a simple list + of comma-separated pairs of a username and a corresponding password + hash. The password hash is a SHA256 hash of the string "{$user}$pass- + word". The file can also contain commented lines (starting with the # + character). An example of commands to generate the password hash on a UNIX/Linux system is given below: > S_USER=mario S_PASSWD=rossi @@ -419,7 +419,7 @@ - ESnet February 2018 IPERF3(1) + ESnet March 2018 IPERF3(1) The iperf3 manual page will typically be installed in manual section 1. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/news.rst new/iperf-3.6/docs/news.rst --- old/iperf-3.5/docs/news.rst 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/news.rst 2018-06-22 23:20:47.000000000 +0200 @@ -1,6 +1,15 @@ iperf3 Project News =================== +2018-03-02: iperf-3.5 released +------------------------------- + +| URL: http://downloads.es.net/pub/iperf/iperf-3.5.tar.gz +| SHA256: ``539bd9ecdca1b8c1157ff85b70ed09b3c75242e69886fc16b54883b399f72cd5 iperf-3.5.tar.gz`` + +iperf 3.5 fixes a bug that could over-count data transfers (and hence +measured bitrate). + 2018-02-14: iperf-3.4 released ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/docs/obtaining.rst new/iperf-3.6/docs/obtaining.rst --- old/iperf-3.5/docs/obtaining.rst 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/docs/obtaining.rst 2018-06-22 23:20:47.000000000 +0200 @@ -34,7 +34,7 @@ Source distributions of iperf are available as compressed (gzip) tarballs at: -http://downloads.es.net/pub/iperf/ +https://downloads.es.net/pub/iperf/ **Note:** Due to a software packaging error, the 3.0.2 release tarball was not compressed, even though its filename had a ``.tar.gz`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/examples/Makefile.in new/iperf-3.6/examples/Makefile.in --- old/iperf-3.5/examples/Makefile.in 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/examples/Makefile.in 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/iperf3.spec.in new/iperf-3.6/iperf3.spec.in --- old/iperf-3.5/iperf3.spec.in 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/iperf3.spec.in 2018-06-22 23:20:47.000000000 +0200 @@ -5,8 +5,8 @@ Group: Applications/Internet License: BSD -URL: http://github.com/esnet/iperf -Source0: http://stats.es.net/software/iperf-%{version}.tar.gz +URL: https://github.com/esnet/iperf +Source0: https://downloads.es.net/pub/iperf/iperf-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %if 0%{?el5} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/Makefile.in new/iperf-3.6/src/Makefile.in --- old/iperf-3.5/src/Makefile.in 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/Makefile.in 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf.h new/iperf-3.6/src/iperf.h --- old/iperf-3.5/src/iperf.h 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf.h 2018-06-22 23:20:47.000000000 +0200 @@ -1,5 +1,5 @@ /* - * iperf, Copyright (c) 2014, 2015, 2016, 2017, The Regents of the University of + * iperf, Copyright (c) 2014-2018, The Regents of the University of * California, through Lawrence Berkeley National Laboratory (subject * to receipt of any required approvals from the U.S. Dept. of * Energy). All rights reserved. @@ -62,6 +62,11 @@ #include "queue.h" #include "cjson.h" +#if defined(HAVE_SSL) +#include <openssl/bio.h> +#include <openssl/evp.h> +#endif // HAVE_SSL + typedef uint64_t iperf_size_t; struct iperf_interval_results @@ -141,7 +146,12 @@ iperf_size_t blocks; /* number of blocks (packets) to send */ char unit_format; /* -f */ int num_ostreams; /* SCTP initmsg settings */ +#if defined(HAVE_SSL) char *authtoken; /* Authentication token */ + char *client_username; + char *client_password; + EVP_PKEY *client_rsa_pubkey; +#endif // HAVE_SSL int connect_timeout; /* socket connection timeout, in ms */ }; @@ -244,6 +254,7 @@ cpuset_t cpumask; #endif /* HAVE_CPUSET_SETAFFINITY */ char *title; /* -T option */ + char *extra_data; /* --extra-data */ char *congestion; /* -C option */ char *congestion_used; /* what was actually used */ char *remote_congestion_used; /* what the other side used */ @@ -257,8 +268,11 @@ int prot_listener; int ctrl_sck_mss; /* MSS for the control channel */ - char *server_rsa_private_key; - char *server_authorized_users; + +#if defined(HAVE_SSL) + char *server_authorized_users; + EVP_PKEY *server_rsa_private_key; +#endif // HAVE_SSL /* boolean variables for Options */ int daemon; /* -D option */ @@ -273,6 +287,7 @@ int udp_counters_64bit; /* --use-64-bit-udp-counters */ int forceflush; /* --forceflush - flushing output at every interval */ int multisend; + int repeating_payload; /* --repeating-payload */ char *json_output_string; /* rendered JSON output if json_output is set */ /* Select related parameters */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf3.1 new/iperf-3.6/src/iperf3.1 --- old/iperf-3.5/src/iperf3.1 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf3.1 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -.TH IPERF3 1 "March 2018" ESnet "User Manuals" +.TH IPERF3 1 "June 2018" ESnet "User Manuals" .SH NAME iperf3 \- perform network throughput tests .SH SYNOPSIS @@ -335,6 +335,9 @@ .BR -T ", " --title " \fIstr\fR" Prefix every output line with this string. .TP +.BR --extra-data " \fIstr\fR" +Specify an extra data string field to be included in JSON output. +.TP .BR -C ", " --congestion " \fIalgo\fR" Set the congestion control algorithm (Linux and FreeBSD only). An older @@ -350,6 +353,13 @@ in a JSON object; otherwise it is appended at the bottom of the human-readable output. .TP +.BR --repeating-payload +Use repeating pattern in payload, instead of random bytes. +The same payload is used in iperf2 (ASCII '0..9' repeating). +It might help to test and reveal problems in networking gear with hardware +compression (including some WiFi access points), where iperf2 and iperf3 +perform differently, just based on payload entropy. +.TP .BR --username " \fIusername\fR" username to use for authentication to the iperf server (if built with OpenSSL support). @@ -361,7 +371,7 @@ .SH EXAMPLES .SS "Authentication - RSA Keypair" -The authentication feature of requires an RSA public keypair. +The authentication feature of iperf3 requires an RSA public keypair. The public key is used to encrypt the authentication token containing the user credentials, while the private key is used to decrypt the authentication token. An example of a set of UNIX/Linux commands to generate correct keypair follows: @@ -409,8 +419,8 @@ .SH AUTHORS A list of the contributors to iperf3 can be found within the documentation located at -\fChttp://software.es.net/iperf/dev.html#authors\fR. +\fChttps://software.es.net/iperf/dev.html#authors\fR. .SH "SEE ALSO" libiperf(3), -http://software.es.net/iperf +https://software.es.net/iperf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_api.c new/iperf-3.6/src/iperf_api.c --- old/iperf-3.5/src/iperf_api.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_api.c 2018-06-22 23:20:47.000000000 +0200 @@ -83,6 +83,7 @@ #include "iperf_locale.h" #include "version.h" #if defined(HAVE_SSL) +#include <openssl/bio.h> #include "iperf_auth.h" #endif /* HAVE_SSL */ @@ -290,6 +291,18 @@ return ipt->one_off; } +int +iperf_get_test_tos(struct iperf_test *ipt) +{ + return ipt->settings->tos; +} + +char * +iperf_get_test_extra_data(struct iperf_test *ipt) +{ + return ipt->extra_data; +} + /************** Setter routines for some fields inside iperf_test *************/ void @@ -449,6 +462,26 @@ ipt->settings->unit_format = unit_format; } +#if defined(HAVE_SSL) +void +iperf_set_test_client_username(struct iperf_test *ipt, char *client_username) +{ + ipt->settings->client_username = client_username; +} + +void +iperf_set_test_client_password(struct iperf_test *ipt, char *client_password) +{ + ipt->settings->client_password = client_password; +} + +void +iperf_set_test_client_rsa_pubkey(struct iperf_test *ipt, char *client_rsa_pubkey_base64) +{ + ipt->settings->client_rsa_pubkey = load_pubkey_from_base64(client_rsa_pubkey_base64); +} +#endif // HAVE_SSL + void iperf_set_test_bind_address(struct iperf_test *ipt, char *bnd_address) { @@ -467,6 +500,18 @@ ipt->one_off = one_off; } +void +iperf_set_test_tos(struct iperf_test *ipt, int tos) +{ + ipt->settings->tos = tos; +} + +void +iperf_set_test_extra_data(struct iperf_test *ipt, char *dat) +{ + ipt->extra_data = dat; +} + /********************** Get/set test protocol structure ***********************/ struct protocol * @@ -515,7 +560,7 @@ iperf_on_test_start(struct iperf_test *test) { if (test->json_output) { - cJSON_AddItemToObject(test->json_start, "test_start", iperf_json_printf("protocol: %s num_streams: %d blksize: %d omit: %d duration: %d bytes: %d blocks: %d reverse: %d tos: %d", test->protocol->name, (int64_t) test->num_streams, (int64_t) test->settings->blksize, (int64_t) test->omit, (int64_t) test->duration, (int64_t) test->settings->bytes, (int64_t) test->settings->blocks, test->reverse?(int64_t)1:(int64_t)0, test->settings->tos)); + cJSON_AddItemToObject(test->json_start, "test_start", iperf_json_printf("protocol: %s num_streams: %d blksize: %d omit: %d duration: %d bytes: %d blocks: %d reverse: %d tos: %d", test->protocol->name, (int64_t) test->num_streams, (int64_t) test->settings->blksize, (int64_t) test->omit, (int64_t) test->duration, (int64_t) test->settings->bytes, (int64_t) test->settings->blocks, test->reverse?(int64_t)1:(int64_t)0, (int64_t) test->settings->tos)); } else { if (test->verbose) { if (test->settings->bytes) @@ -655,12 +700,14 @@ {"version6", no_argument, NULL, '6'}, {"tos", required_argument, NULL, 'S'}, {"dscp", required_argument, NULL, OPT_DSCP}, + {"extra-data", required_argument, NULL, OPT_EXTRA_DATA}, #if defined(HAVE_FLOWLABEL) {"flowlabel", required_argument, NULL, 'L'}, #endif /* HAVE_FLOWLABEL */ {"zerocopy", no_argument, NULL, 'Z'}, {"omit", required_argument, NULL, 'O'}, {"file", required_argument, NULL, 'F'}, + {"repeating-payload", no_argument, NULL, OPT_REPEATING_PAYLOAD}, #if defined(HAVE_CPU_AFFINITY) {"affinity", required_argument, NULL, 'A'}, #endif /* HAVE_CPU_AFFINITY */ @@ -707,7 +754,7 @@ blksize = 0; server_flag = client_flag = rate_flag = duration_flag = 0; #if defined(HAVE_SSL) - char *client_username = NULL, *client_rsa_public_key = NULL; + char *client_username = NULL, *client_rsa_public_key = NULL, *server_rsa_private_key = NULL; #endif /* HAVE_SSL */ while ((flag = getopt_long(argc, argv, "p:f:i:D1VJvsc:ub:t:n:k:l:P:Rw:B:M:N46S:L:ZO:F:A:T:C:dI:hX:", longopts, NULL)) != -1) { @@ -903,6 +950,10 @@ } client_flag = 1; break; + case OPT_EXTRA_DATA: + test->extra_data = strdup(optarg); + client_flag = 1; + break; case 'L': #if defined(HAVE_FLOWLABEL) test->settings->flowlabel = strtol(optarg, &endptr, 0); @@ -939,6 +990,10 @@ test->zerocopy = 1; client_flag = 1; break; + case OPT_REPEATING_PAYLOAD: + test->repeating_payload = 1; + client_flag = 1; + break; case 'O': test->omit = atoi(optarg); if (test->omit < 0 || test->omit > 60) { @@ -1032,7 +1087,7 @@ client_rsa_public_key = strdup(optarg); break; case OPT_SERVER_RSA_PRIVATE_KEY: - test->server_rsa_private_key = strdup(optarg); + server_rsa_private_key = strdup(optarg); break; case OPT_SERVER_AUTHORIZED_USERS: test->server_authorized_users = strdup(optarg); @@ -1096,24 +1151,30 @@ return -1; } - if (test_load_pubkey(client_rsa_public_key) < 0){ + if (test_load_pubkey_from_file(client_rsa_public_key) < 0){ i_errno = IESETCLIENTAUTH; return -1; } - encode_auth_setting(client_username, client_password, client_rsa_public_key, &test->settings->authtoken); + + test->settings->client_username = client_username; + test->settings->client_password = client_password; + test->settings->client_rsa_pubkey = load_pubkey_from_file(client_rsa_public_key); } - if (test->role == 'c' && (test->server_rsa_private_key || test->server_authorized_users)){ + if (test->role == 'c' && (server_rsa_private_key || test->server_authorized_users)){ i_errno = IESERVERONLY; return -1; - } else if (test->role == 's' && (test->server_rsa_private_key || test->server_authorized_users) && - !(test->server_rsa_private_key && test->server_authorized_users)) { + } else if (test->role == 's' && (server_rsa_private_key || test->server_authorized_users) && + !(server_rsa_private_key && test->server_authorized_users)) { i_errno = IESETSERVERAUTH; return -1; - } else if (test->role == 's' && test->server_rsa_private_key && test_load_private_key(test->server_rsa_private_key) < 0){ + } else if (test->role == 's' && server_rsa_private_key && test_load_private_key_from_file(server_rsa_private_key) < 0){ i_errno = IESETSERVERAUTH; return -1; + } else { + test->server_rsa_private_key = load_privkey_from_file(server_rsa_private_key); } + #endif //HAVE_SSL if (blksize == 0) { if (test->protocol->id == Pudp) @@ -1165,6 +1226,19 @@ return -1; } + /* Show warning if JSON output is used with explicit report format */ + if ((test->json_output) && (test->settings->unit_format != 'a')) { + warning("Report format (-f) flag ignored with JSON output (-J)"); + } + + /* Show warning if JSON output is used with verbose or debug flags */ + if (test->json_output && test->verbose) { + warning("Verbose output (-v) may interfere with JSON output (-J)"); + } + if (test->json_output && test->debug) { + warning("Debug output (-d) may interfere with JSON output (-J)"); + } + return 0; } @@ -1498,6 +1572,8 @@ cJSON_AddNumberToObject(j, "flowlabel", test->settings->flowlabel); if (test->title) cJSON_AddStringToObject(j, "title", test->title); + if (test->extra_data) + cJSON_AddStringToObject(j, "extra_data", test->extra_data); if (test->congestion) cJSON_AddStringToObject(j, "congestion", test->congestion); if (test->congestion_used) @@ -1507,8 +1583,10 @@ if (test->udp_counters_64bit) cJSON_AddNumberToObject(j, "udp_counters_64bit", iperf_get_test_udp_counters_64bit(test)); #if defined(HAVE_SSL) - if (test->settings->authtoken) + if (test->settings->client_username && test->settings->client_password && test->settings->client_rsa_pubkey){ + encode_auth_setting(test->settings->client_username, test->settings->client_password, test->settings->client_rsa_pubkey, &test->settings->authtoken); cJSON_AddStringToObject(j, "authtoken", test->settings->authtoken); + } #endif // HAVE_SSL cJSON_AddStringToObject(j, "client_version", IPERF_VERSION); @@ -1585,6 +1663,8 @@ test->settings->flowlabel = j_p->valueint; if ((j_p = cJSON_GetObjectItem(j, "title")) != NULL) test->title = strdup(j_p->valuestring); + if ((j_p = cJSON_GetObjectItem(j, "extra_data")) != NULL) + test->extra_data = strdup(j_p->valuestring); if ((j_p = cJSON_GetObjectItem(j, "congestion")) != NULL) test->congestion = strdup(j_p->valuestring); if ((j_p = cJSON_GetObjectItem(j, "congestion_used")) != NULL) @@ -2051,6 +2131,7 @@ CPU_ZERO(&testp->cpumask); #endif /* HAVE_CPUSET_SETAFFINITY */ testp->title = NULL; + testp->extra_data = NULL; testp->congestion = NULL; testp->congestion_used = NULL; testp->remote_congestion_used = NULL; @@ -2183,6 +2264,8 @@ free(test->settings); if (test->title) free(test->title); + if (test->extra_data) + free(test->extra_data); if (test->congestion) free(test->congestion); if (test->congestion_used) @@ -2306,10 +2389,26 @@ test->settings->burst = 0; test->settings->mss = 0; test->settings->tos = 0; + +#if defined(HAVE_SSL) if (test->settings->authtoken) { - free(test->settings->authtoken); - test->settings->authtoken = NULL; + free(test->settings->authtoken); + test->settings->authtoken = NULL; + } + if (test->settings->client_username) { + free(test->settings->client_username); + test->settings->client_username = NULL; + } + if (test->settings->client_password) { + free(test->settings->client_password); + test->settings->client_password = NULL; + } + if (test->settings->client_rsa_pubkey) { + EVP_PKEY_free(test->settings->client_rsa_pubkey); + test->settings->client_rsa_pubkey = NULL; } +#endif /* HAVE_SSL */ + memset(test->cookie, 0, COOKIE_SIZE); test->multisend = 10; /* arbitrary */ test->udp_counters_64bit = 0; @@ -2317,6 +2416,10 @@ free(test->title); test->title = NULL; } + if (test->extra_data) { + free(test->extra_data); + test->extra_data = NULL; + } /* Free output line buffers, if any (on the server only) */ struct iperf_textline *t; @@ -3158,7 +3261,8 @@ iperf_new_stream(struct iperf_test *test, int s) { struct iperf_stream *sp; - + int ret = 0; + char template[1024]; if (test->tmp_template) { snprintf(template, sizeof(template) / sizeof(char), "%s", test->tmp_template); @@ -3248,8 +3352,12 @@ sp->diskfile_fd = -1; /* Initialize stream */ - if ((readentropy(sp->buffer, test->settings->blksize) < 0) || - (iperf_init_stream(sp, test) < 0)) { + if (test->repeating_payload) + fill_with_repeating_pattern(sp->buffer, test->settings->blksize); + else + ret = readentropy(sp->buffer, test->settings->blksize); + + if ((ret < 0) || (iperf_init_stream(sp, test) < 0)) { close(sp->buffer_fd); munmap(sp->buffer, sp->test->settings->blksize); free(sp->result); @@ -3526,6 +3634,8 @@ { if (test->title) cJSON_AddStringToObject(test->json_top, "title", test->title); + if (test->extra_data) + cJSON_AddStringToObject(test->json_top, "extra_data", test->extra_data); /* Include server output */ if (test->json_server_output) { cJSON_AddItemToObject(test->json_top, "server_output_json", test->json_server_output); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_api.h new/iperf-3.6/src/iperf_api.h --- old/iperf-3.5/src/iperf_api.h 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_api.h 2018-06-22 23:20:47.000000000 +0200 @@ -68,6 +68,8 @@ #define OPT_SERVER_AUTHORIZED_USERS 15 #define OPT_PACING_TIMER 16 #define OPT_CONNECT_TIMEOUT 17 +#define OPT_REPEATING_PAYLOAD 18 +#define OPT_EXTRA_DATA 19 /* states */ #define TEST_START 1 @@ -115,6 +117,8 @@ char* iperf_get_test_bind_address ( struct iperf_test* ipt ); int iperf_get_test_udp_counters_64bit( struct iperf_test* ipt ); int iperf_get_test_one_off( struct iperf_test* ipt ); +int iperf_get_test_tos( struct iperf_test* ipt ); +char* iperf_get_extra_data( struct iperf_test* ipt ); /* Setter routines for some fields inside iperf_test. */ void iperf_set_verbose( struct iperf_test* ipt, int verbose ); @@ -141,6 +145,14 @@ void iperf_set_test_bind_address( struct iperf_test* ipt, char *bind_address ); void iperf_set_test_udp_counters_64bit( struct iperf_test* ipt, int udp_counters_64bit ); void iperf_set_test_one_off( struct iperf_test* ipt, int one_off ); +void iperf_set_test_tos( struct iperf_test* ipt, int tos ); +void iperf_set_extra_data( struct iperf_test* ipt, char *dat); + +#if defined(HAVE_SSL) +void iperf_set_test_client_username(struct iperf_test *ipt, char *client_username); +void iperf_set_test_client_password(struct iperf_test *ipt, char *client_password); +void iperf_set_test_client_rsa_pubkey(struct iperf_test *ipt, char *client_rsa_pubkey_base64); +#endif // HAVE_SSL /** * exchange_parameters - handles the param_Exchange part for client diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_auth.c new/iperf-3.6/src/iperf_auth.c --- old/iperf-3.5/src/iperf_auth.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_auth.c 2018-06-22 23:20:47.000000000 +0200 @@ -103,7 +103,7 @@ } -int Base64Encode(unsigned char* buffer, const size_t length, char** b64text) { //Encodes a binary safe base 64 string +int Base64Encode(const unsigned char* buffer, const size_t length, char** b64text) { //Encodes a binary safe base 64 string BIO *bio, *b64; BUF_MEM *bufferPtr; @@ -133,7 +133,7 @@ return (len*3)/4 - padding; } -int Base64Decode(char* b64message, unsigned char** buffer, size_t* length) { //Decodes a base64 encoded string +int Base64Decode(const char* b64message, unsigned char** buffer, size_t* length) { //Decodes a base64 encoded string BIO *bio, *b64; int decodeLen = calcDecodeLength(b64message); @@ -153,7 +153,7 @@ } -EVP_PKEY *load_pubkey(const char *file) { +EVP_PKEY *load_pubkey_from_file(const char *file) { BIO *key = NULL; EVP_PKEY *pkey = NULL; @@ -164,7 +164,18 @@ return (pkey); } -EVP_PKEY *load_key(const char *file) { +EVP_PKEY *load_pubkey_from_base64(const char *buffer) { + unsigned char *key = NULL; + size_t key_len; + Base64Decode(buffer, &key, &key_len); + + BIO* bio = BIO_new(BIO_s_mem()); + BIO_write(bio, key, key_len); + EVP_PKEY *pkey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); + return (pkey); +} + +EVP_PKEY *load_privkey_from_file(const char *file) { BIO *key = NULL; EVP_PKEY *pkey = NULL; @@ -176,8 +187,8 @@ } -int test_load_pubkey(const char *file){ - EVP_PKEY *key = load_pubkey(file); +int test_load_pubkey_from_file(const char *file){ + EVP_PKEY *key = load_pubkey_from_file(file); if (key == NULL){ return -1; } @@ -185,8 +196,8 @@ return 0; } -int test_load_private_key(const char *file){ - EVP_PKEY *key = load_key(file); +int test_load_private_key_from_file(const char *file){ + EVP_PKEY *key = load_privkey_from_file(file); if (key == NULL){ return -1; } @@ -194,17 +205,14 @@ return 0; } -int encrypt_rsa_message(const char *plaintext, const char *public_keyfile, unsigned char **encryptedtext) { - EVP_PKEY *public_key = NULL; +int encrypt_rsa_message(const char *plaintext, EVP_PKEY *public_key, unsigned char **encryptedtext) { RSA *rsa = NULL; unsigned char *rsa_buffer = NULL, pad = RSA_PKCS1_PADDING; int keysize, encryptedtext_len, rsa_buffer_len; - public_key = load_pubkey(public_keyfile); rsa = EVP_PKEY_get1_RSA(public_key); - EVP_PKEY_free(public_key); - keysize = RSA_size(rsa); + rsa_buffer = OPENSSL_malloc(keysize * 2); *encryptedtext = (unsigned char*)OPENSSL_malloc(keysize); @@ -219,15 +227,12 @@ return encryptedtext_len; } -int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedtext_len, const char *private_keyfile, unsigned char **plaintext) { - EVP_PKEY *private_key = NULL; +int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedtext_len, EVP_PKEY *private_key, unsigned char **plaintext) { RSA *rsa = NULL; unsigned char *rsa_buffer = NULL, pad = RSA_PKCS1_PADDING; int plaintext_len, rsa_buffer_len, keysize; - private_key = load_key(private_keyfile); rsa = EVP_PKEY_get1_RSA(private_key); - EVP_PKEY_free(private_key); keysize = RSA_size(rsa); rsa_buffer = OPENSSL_malloc(keysize * 2); @@ -244,26 +249,26 @@ return plaintext_len; } -int encode_auth_setting(const char *username, const char *password, const char *public_keyfile, char **authtoken){ +int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken){ time_t t = time(NULL); time_t utc_seconds = mktime(localtime(&t)); char text[150]; sprintf (text, "user: %s\npwd: %s\nts: %ld", username, password, utc_seconds); unsigned char *encrypted = NULL; int encrypted_len; - encrypted_len = encrypt_rsa_message(text, public_keyfile, &encrypted); + encrypted_len = encrypt_rsa_message(text, public_key, &encrypted); Base64Encode(encrypted, encrypted_len, authtoken); return (0); //success } -int decode_auth_setting(int enable_debug, char *authtoken, const char *private_keyfile, char **username, char **password, time_t *ts){ +int decode_auth_setting(int enable_debug, char *authtoken, EVP_PKEY *private_key, char **username, char **password, time_t *ts){ unsigned char *encrypted_b64 = NULL; size_t encrypted_len_b64; Base64Decode(authtoken, &encrypted_b64, &encrypted_len_b64); unsigned char *plaintext = NULL; int plaintext_len; - plaintext_len = decrypt_rsa_message(encrypted_b64, encrypted_len_b64, private_keyfile, &plaintext); + plaintext_len = decrypt_rsa_message(encrypted_b64, encrypted_len_b64, private_key, &plaintext); plaintext[plaintext_len] = '\0'; char s_username[20], s_password[20]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_auth.h new/iperf-3.6/src/iperf_auth.h --- old/iperf-3.5/src/iperf_auth.h 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_auth.h 2018-06-22 23:20:47.000000000 +0200 @@ -27,10 +27,14 @@ #include <time.h> #include <sys/types.h> +#include <openssl/bio.h> -int test_load_pubkey(const char *public_keyfile); -int test_load_private_key(const char *private_keyfile); -int encode_auth_setting(const char *username, const char *password, const char *public_keyfile, char **authtoken); -int decode_auth_setting(int enable_debug, const char *authtoken, const char *private_keyfile, char **username, char **password, time_t *ts); +int test_load_pubkey_from_file(const char *public_keyfile); +int test_load_private_key_from_file(const char *private_keyfile); +EVP_PKEY *load_pubkey_from_file(const char *file); +EVP_PKEY *load_pubkey_from_base64(const char *buffer); +EVP_PKEY *load_privkey_from_file(const char *file); +int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken); +int decode_auth_setting(int enable_debug, const char *authtoken, EVP_PKEY *private_key, char **username, char **password, time_t *ts); int check_authentication(const char *username, const char *password, const time_t ts, const char *filename); ssize_t iperf_getpass (char **lineptr, size_t *n, FILE *stream); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_client_api.c new/iperf-3.6/src/iperf_client_api.c --- old/iperf-3.5/src/iperf_client_api.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_client_api.c 2018-06-22 23:20:47.000000000 +0200 @@ -346,22 +346,22 @@ socklen_t len; len = sizeof(opt); - if (getsockopt(test->ctrl_sck, IPPROTO_TCP, TCP_MAXSEG, &opt, &len) < 0) { - test->ctrl_sck_mss = 0; - } - else { - if (opt > 0 && opt <= MAX_UDP_BLOCKSIZE) { - test->ctrl_sck_mss = opt; - } - else { - char str[128]; - snprintf(str, sizeof(str), - "Ignoring nonsense TCP MSS %d", opt); - warning(str); + if (getsockopt(test->ctrl_sck, IPPROTO_TCP, TCP_MAXSEG, &opt, &len) < 0) { + test->ctrl_sck_mss = 0; + } + else { + if (opt > 0 && opt <= MAX_UDP_BLOCKSIZE) { + test->ctrl_sck_mss = opt; + } + else { + char str[128]; + snprintf(str, sizeof(str), + "Ignoring nonsense TCP MSS %d", opt); + warning(str); - test->ctrl_sck_mss = 0; - } - } + test->ctrl_sck_mss = 0; + } + } if (test->verbose) { printf("Control connection MSS %d\n", test->ctrl_sck_mss); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_locale.c new/iperf-3.6/src/iperf_locale.c --- old/iperf-3.5/src/iperf_locale.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_locale.c 2018-06-22 23:20:47.000000000 +0200 @@ -169,8 +169,11 @@ " -Z, --zerocopy use a 'zero copy' method of sending data\n" " -O, --omit N omit the first n seconds\n" " -T, --title str prefix every output line with this string\n" + " --extra-data str data string to include in client and server JSON\n" " --get-server-output get results from server\n" " --udp-counters-64bit use 64-bit counters in UDP test packets\n" + " --repeating-payload use repeating pattern in payload, instead of\n" + " randomized payload (like in iperf2)\n" #if defined(HAVE_SSL) " --username username for authentication\n" " --rsa-public-key-path path to the RSA public key used to encrypt\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_sctp.c new/iperf-3.6/src/iperf_sctp.c --- old/iperf-3.5/src/iperf_sctp.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_sctp.c 2018-06-22 23:20:47.000000000 +0200 @@ -165,7 +165,16 @@ snprintf(portstr, 6, "%d", test->server_port); memset(&hints, 0, sizeof(hints)); - hints.ai_family = (test->settings->domain == AF_UNSPEC ? AF_INET6 : test->settings->domain); + /* + * If binding to the wildcard address with no explicit address + * family specified, then force us to get an AF_INET6 socket. + * More details in the comments in netanounce(). + */ + if (test->settings->domain == AF_UNSPEC && !test->bind_address) { + hints.ai_family = AF_INET6; + } else { + hints.ai_family = test->settings->domain; + } hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; if (getaddrinfo(test->bind_address, portstr, &hints, &res) != 0) { @@ -180,10 +189,11 @@ } #if defined(IPV6_V6ONLY) && !defined(__OpenBSD__) - if (test->settings->domain == AF_UNSPEC || test->settings->domain == AF_INET6) { + if (res->ai_family == AF_INET6 && (test->settings->domain == AF_UNSPEC || + test->settings->domain == AF_INET6)) { if (test->settings->domain == AF_UNSPEC) opt = 0; - else if (test->settings->domain == AF_INET6) + else opt = 1; if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &opt, sizeof(opt)) < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_util.c new/iperf-3.6/src/iperf_util.c --- old/iperf-3.5/src/iperf_util.c 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_util.c 2018-06-22 23:20:47.000000000 +0200 @@ -79,6 +79,27 @@ } +/* + * Fills buffer with repeating pattern (similar to pattern that used in iperf2) + */ +void fill_with_repeating_pattern(void *out, size_t outsize) +{ + size_t i; + int counter = 0; + char *buf = (char *)out; + + if (!outsize) return; + + for (i = 0; i < outsize; i++) { + buf[i] = (char)('0' + counter); + if (counter >= 9) + counter = 0; + else + counter++; + } +} + + /* make_cookie * * Generate and return a cookie string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/iperf_util.h new/iperf-3.6/src/iperf_util.h --- old/iperf-3.5/src/iperf_util.h 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/iperf_util.h 2018-06-22 23:20:47.000000000 +0200 @@ -34,6 +34,8 @@ int readentropy(void *out, size_t outsize); +void fill_with_repeating_pattern(void *out, size_t outsize); + void make_cookie(char *); int is_closed(int); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/libiperf.3 new/iperf-3.6/src/libiperf.3 --- old/iperf-3.5/src/libiperf.3 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/libiperf.3 2018-06-22 23:20:47.000000000 +0200 @@ -1,4 +1,4 @@ -.TH LIBIPERF 3 "February 2018" ESnet "User Manuals" +.TH LIBIPERF 3 "June 2018" ESnet "User Manuals" .SH NAME libiperf \- API for iperf3 network throughput tester @@ -33,6 +33,13 @@ void iperf_set_test_json_output( struct iperf_test *t, int json_output ); int iperf_has_zerocopy( void ); void iperf_set_test_zerocopy( struct iperf_test* t, int zerocopy ); + void iperf_set_test_tos( struct iperf_test* t, int tos ); +.fi +Authentication functions: +.nf + void iperf_set_test_client_username(struct iperf_test *ipt, char *client_username) + void iperf_set_test_client_password(struct iperf_test *ipt, char *client_password) + void iperf_set_test_client_rsa_pubkey(struct iperf_test *ipt, char *client_rsa_pubkey_base64) .fi Running a test: .nf @@ -99,8 +106,8 @@ .SH AUTHORS A list of the contributors to iperf3 can be found within the documentation located at -\fChttp://software.es.net/iperf/dev.html#authors\fR. +\fChttps://software.es.net/iperf/dev.html#authors\fR. .SH "SEE ALSO" iperf3(1), -http://software.es.net/iperf/ +https://software.es.net/iperf/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iperf-3.5/src/portable_endian.h new/iperf-3.6/src/portable_endian.h --- old/iperf-3.5/src/portable_endian.h 2018-02-28 22:24:06.000000000 +0100 +++ new/iperf-3.6/src/portable_endian.h 2018-06-22 23:20:47.000000000 +0200 @@ -71,6 +71,16 @@ # include <netinet/in.h> # include <inttypes.h> +# if !defined (ntohll) || !defined(htonll) +# ifdef _BIG_ENDIAN +# define htonll(x) (x) +# define ntohll(x) (x) +# else +# define htonll(x) ((((uint64_t)htonl(x)) << 32) + htonl((uint64_t)(x) >> 32)) +# define ntohll(x) ((((uint64_t)ntohl(x)) << 32) + ntohl((uint64_t)(x) >> 32)) +# endif +# endif + # define be64toh(x) ntohll(x) # define htobe64(x) htonll(x)