diff --git a/iperf3/iperf3-3.16.tar.gz b/iperf3/iperf3-3.16.tar.gz deleted file mode 100644 index 1a6f72297..000000000 Binary files a/iperf3/iperf3-3.16.tar.gz and /dev/null differ diff --git a/iperf3/iperf3-3.17.1.tar.gz b/iperf3/iperf3-3.17.1.tar.gz new file mode 100644 index 000000000..487d241d1 Binary files /dev/null and b/iperf3/iperf3-3.17.1.tar.gz differ diff --git a/iperf3/unibuild-packaging/deb/changelog b/iperf3/unibuild-packaging/deb/changelog index b51a3b5c2..b5a3559ee 100644 --- a/iperf3/unibuild-packaging/deb/changelog +++ b/iperf3/unibuild-packaging/deb/changelog @@ -1,3 +1,9 @@ +iperf3 (3.17.1-1) perfsonar-5.1-staging; urgency=low + + * New upstream version + + -- Mark Feit Wed, 15 May 2024 15:50:00 -0400 + iperf3 (3.16-1) perfsonar-5.0-staging; urgency=low * New upstream version diff --git a/iperf3/unibuild-packaging/rpm/iperf3.spec b/iperf3/unibuild-packaging/rpm/iperf3.spec index 14cc4199c..20682ea35 100644 --- a/iperf3/unibuild-packaging/rpm/iperf3.spec +++ b/iperf3/unibuild-packaging/rpm/iperf3.spec @@ -5,7 +5,7 @@ # Name: iperf3 -Version: 3.16 +Version: 3.17.1 Release: 1%{?dist} Summary: Measurement tool for TCP/UDP bandwidth performance diff --git a/pscheduler-tool-iperf3/iperf3/participant-data b/pscheduler-tool-iperf3/iperf3/participant-data index d32bb6b76..187fc793e 100755 --- a/pscheduler-tool-iperf3/iperf3/participant-data +++ b/pscheduler-tool-iperf3/iperf3/participant-data @@ -4,6 +4,7 @@ # import hashlib +import packaging.version import pscheduler import sys import iperf3_utils @@ -17,9 +18,25 @@ from cryptography.hazmat.backends import default_backend json = pscheduler.json_load(exit_on_error=True) result = { - "schema": 2 + "schema": 3 } + +# Provide the local iperf3 version + +status, out, err = pscheduler.run_program(['iperf3', '--version'], timeout=2) +if status != 0: + pscheduler.fail(f'Unable to run iperf3: {err}') + +try: + version_text = out.split()[1] + version = packaging.version.Version(version_text) +except (IndexError, packaging.version.InvalidVersion) as ex: + pscheduler.fail(str(ex)) + +result['iperf3-version'] = str(version) + + try: participant = json['participant'] except KeyError: diff --git a/pscheduler-tool-iperf3/iperf3/run b/pscheduler-tool-iperf3/iperf3/run index 29d2efe17..1ce7945df 100755 --- a/pscheduler-tool-iperf3/iperf3/run +++ b/pscheduler-tool-iperf3/iperf3/run @@ -15,6 +15,7 @@ import sys import time import threading import iperf3_parser +import packaging.version import tempfile import traceback import iperf3_utils @@ -78,11 +79,51 @@ else: # if we're doing a reverse test, have to change a few things reverse = test_spec.get('reverse', False) + +iperf3_first_args = [ iperf3_cmd ] + + +if participants > 1: + + # iperf3 3.17 broke compatibility with 3.16 to fix a security + # vulnerability but has a switch to allow interoperability with older + # versions. + + other_participant = 1 if participant == 0 else 0 + + # Any pScheduler that doesn't provide iperf3-version in its + # participant data is presumed to be using an iperf3 earlier than + # 3.17 that we'll call 0.0. + + my_version = packaging.version.Version(participant_data[participant].get('iperf3-version', '0.0')) + other_version = packaging.version.Version(participant_data[other_participant].get('iperf3-version', '0.0')) + logger.debug(f'Local iperf3 is {my_version}, other is {other_version}') + + # If the other end is believed-vulnerable and the local iperf3 has + # the compatibility switch, use it. + + if other_version < packaging.version.Version('3.17') and my_version >= packaging.version.Version('3.17'): + logger.debug(f'Other side is using an old iperf3 ({other_version}); running in vulnerable mode') + iperf3_first_args.append('--use-pkcs1-padding') + +else: + + # Where there's one participant, we don't care. Loopback will + # work correctly because it's the same binary on both ends. For + # single-ended, opt for whatever the default behavior is because + # we can't tell what's on the other end. This may cause those + # tests to break. + + logger.debug(f'Only one participant; running in iperf3 default mode') + + + def run_client(): diags = [] - iperf3_args = [ iperf3_cmd ] + global iperf3_first_args + iperf3_args = iperf3_first_args.copy() iperf3_args.append('-p') iperf3_args.append(server_port) @@ -309,9 +350,17 @@ def run_server(): diags = [] #init command - iperf3_args = [ iperf3_cmd, '-s', '-1', '--idle-timeout', str(test_duration), '--json'] - iperf3_args.append("-p") - iperf3_args.append(server_port) + + global iperf3_first_args + iperf3_args = iperf3_first_args.copy() + + iperf3_args.extend([ + '-s', + '-1', + '--idle-timeout', str(test_duration), + '--json', + '-p', server_port + ]) #Determine if we need to bind to an address and have enough info to do so intelligently ip_version = test_spec.get('ip-version', None) diff --git a/pscheduler-tool-iperf3/iperf3/unibuild-packaging/rpm/pscheduler-tool-iperf3.spec b/pscheduler-tool-iperf3/iperf3/unibuild-packaging/rpm/pscheduler-tool-iperf3.spec index 2b9c0e91a..967e63a4b 100644 --- a/pscheduler-tool-iperf3/iperf3/unibuild-packaging/rpm/pscheduler-tool-iperf3.spec +++ b/pscheduler-tool-iperf3/iperf3/unibuild-packaging/rpm/pscheduler-tool-iperf3.spec @@ -24,7 +24,7 @@ Requires: pscheduler-server >= 4.4.0 Requires: %{_pscheduler_python}-pscheduler >= 4.4.1 Requires: %{_pscheduler_python}-cryptography Requires: pscheduler-test-throughput -requires: iperf3 >= 3.11 +requires: iperf3 >= 3.17.1 Requires: numactl BuildRequires: pscheduler-rpm diff --git a/unibuild-order b/unibuild-order index 47f8e76e9..93eaf289b 100755 --- a/unibuild-order +++ b/unibuild-order @@ -124,7 +124,7 @@ ifelse(DISTRO/eval(MAJOR <= 18),Ubuntu/1,, # Doesn't build on U18, TODO: no HAVE_ETHR,1,ethr) # But D10 build can be used on U18 and up iperf -ifelse(FAMILY/eval(MAJOR == 10 || MAJOR == 12),Debian/1,iperf3, # We only want iperf3 on D10 and D12 +ifelse(FAMILY/eval(MAJOR == 12),Debian/1,iperf3, # We only want iperf3 on D12 FAMILY,Debian,, iperf3) nuttcp