From 721dccc30d14d7a2e00f3dbffc876d6dc8abd2a8 Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 May 2022 09:49:59 -0400 Subject: [PATCH] Auto sync2gitlab import of iperf3-3.5-6.el8.src.rpm --- .gitignore | 1 + 0002-udp-counters-manpage.patch | 18 +++ 0003-covscan-sctp.patch | 69 ++++++++++++ EMPTY | 1 - iperf3.spec | 194 ++++++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 0002-udp-counters-manpage.patch create mode 100644 0003-covscan-sctp.patch delete mode 100644 EMPTY create mode 100644 iperf3.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eca1138 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/iperf-3.5.tar.gz diff --git a/0002-udp-counters-manpage.patch b/0002-udp-counters-manpage.patch new file mode 100644 index 0000000..f78b403 --- /dev/null +++ b/0002-udp-counters-manpage.patch @@ -0,0 +1,18 @@ +diff --git a/src/iperf3.1 b/src/iperf3.1 +index 05483a9..35a0873 100644 +--- a/src/iperf3.1 ++++ b/src/iperf3.1 +@@ -329,6 +329,13 @@ If the client is run with \fB--json\fR, the server output is included + in a JSON object; otherwise it is appended at the bottom of the + human-readable output. + .TP ++.BR --udp-counters-64bit ++Use 64-bit counters in UDP test packets. ++The use of this option can help prevent counter overflows during long ++or high-bitrate UDP tests. Both client and server need to be running ++at least version 3.1 for this option to work. It may become the ++default behavior at some point in the future. ++.TP + .BR --username " \fIusername\fR" + username to use for authentication to the iperf server (if built with + OpenSSL support). diff --git a/0003-covscan-sctp.patch b/0003-covscan-sctp.patch new file mode 100644 index 0000000..3d18870 --- /dev/null +++ b/0003-covscan-sctp.patch @@ -0,0 +1,69 @@ +diff --git a/src/iperf_sctp.c b/src/iperf_sctp.c +index a0869a3..13f5cdf 100644 +--- a/src/iperf_sctp.c ++++ b/src/iperf_sctp.c +@@ -130,12 +130,14 @@ iperf_sctp_accept(struct iperf_test * test) + + if (Nread(s, cookie, COOKIE_SIZE, Psctp) < 0) { + i_errno = IERECVCOOKIE; ++ close(s); + return -1; + } + +- if (strcmp(test->cookie, cookie) != 0) { ++ if (strncmp(test->cookie, cookie, COOKIE_SIZE) != 0) { + if (Nwrite(s, (char*) &rbuf, sizeof(rbuf), Psctp) < 0) { + i_errno = IESENDMESSAGE; ++ close(s); + return -1; + } + close(s); +@@ -209,9 +211,11 @@ iperf_sctp_listen(struct iperf_test *test) + + /* servers must call sctp_bindx() _instead_ of bind() */ + if (!TAILQ_EMPTY(&test->xbind_addrs)) { +- freeaddrinfo(res); +- if (iperf_sctp_bindx(test, s, IPERF_SCTP_SERVER)) ++ if (iperf_sctp_bindx(test, s, IPERF_SCTP_SERVER)) { ++ close(s); ++ freeaddrinfo(res); + return -1; ++ } + } else + if (bind(s, (struct sockaddr *) res->ai_addr, res->ai_addrlen) < 0) { + saved_errno = errno; +@@ -422,8 +426,11 @@ iperf_sctp_connect(struct iperf_test *test) + + /* clients must call bind() followed by sctp_bindx() before connect() */ + if (!TAILQ_EMPTY(&test->xbind_addrs)) { +- if (iperf_sctp_bindx(test, s, IPERF_SCTP_CLIENT)) ++ if (iperf_sctp_bindx(test, s, IPERF_SCTP_CLIENT)) { ++ freeaddrinfo(server_res); ++ close(s); + return -1; ++ } + } + + /* TODO support sctp_connectx() to avoid heartbeating. */ +@@ -435,12 +442,12 @@ iperf_sctp_connect(struct iperf_test *test) + i_errno = IESTREAMCONNECT; + return -1; + } +- freeaddrinfo(server_res); + + /* Send cookie for verification */ + if (Nwrite(s, test->cookie, COOKIE_SIZE, Psctp) < 0) { + saved_errno = errno; + close(s); ++ freeaddrinfo(server_res); + errno = saved_errno; + i_errno = IESENDCOOKIE; + return -1; +@@ -464,6 +471,7 @@ iperf_sctp_connect(struct iperf_test *test) + return -1; + } + ++ freeaddrinfo(server_res); + return s; + #else + i_errno = IENOSCTP; diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/iperf3.spec b/iperf3.spec new file mode 100644 index 0000000..9d3453f --- /dev/null +++ b/iperf3.spec @@ -0,0 +1,194 @@ +Name: iperf3 +Version: 3.5 +Release: 6%{?dist} +Summary: Measurement tool for TCP/UDP bandwidth performance + +Group: Applications/Internet +License: BSD +URL: http://github.com/esnet/iperf +Source0: http://downloads.es.net/pub/iperf/iperf-%{version}.tar.gz +BuildRequires: libuuid-devel git-core gcc make +BuildRequires: lksctp-tools-devel +BuildRequires: openssl-devel + +Patch0002: 0002-udp-counters-manpage.patch +Patch0003: 0003-covscan-sctp.patch + +%description +Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of +various parameters and UDP characteristics. Iperf reports bandwidth, delay +jitter, data-gram loss. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -S git -n iperf-%{version} + +%build +%configure --disable-static +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +%makeinstall -C src INSTALL_DIR="%{buildroot}%{_bindir}" +mkdir -p %{buildroot}%{_mandir}/man1 +rm -f %{buildroot}%{_libdir}/libiperf.la + +%files +%defattr(-,root,root,-) +%doc README.md LICENSE RELEASE_NOTES +%{_mandir}/man1/iperf3.1.gz +%{_mandir}/man3/libiperf.3.gz +%{_bindir}/iperf3 +%{_libdir}/*.so.* + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files devel +%defattr(-,root,root,-) +%{_includedir}/iperf_api.h +%{_libdir}/*.so + +%changelog +* Tue May 05 2020 Michal Ruprich - 3.5-6 +- Related: #1665142 - Fixing a couple of covscan issues + +* Fri Mar 13 2020 Michal Ruprich - 3.5-5 +- Related: #1665142 - Removing patch that deletes sctp from manpage + +* Mon Mar 09 2020 Michal Ruprich - 3.5-4 +- Resolves: #1665142 - [RFE] enable SCTP support in iperf3 +- Resolves: #1656429 - option --udp-counters-64bit shown in --help output but not in man page +- Resolves: #1700497 - [RFE] enable SSL support in iperf3 + +* Sun Dec 16 2018 Michal Ruprich - 3.5-3 +- Related: #1647413 - Removing nstreams and xbind from man since these are SCTP-related options + +* Thu Nov 22 2018 Michal Ruprich - 3.5-2 +- Related: #1647413 - adding some BuildRequires + +* Thu Nov 22 2018 Michal Ruprich - 3.5-2 +- Resolves: #1647413 - iperf3 with option --sctp in client mode fails with error 'iperf3: unrecognized option --sctp' + +* Sat Mar 03 2018 Kevin Fenzi - 3.5-1 +- Update to 3.5. Fixes bug #1551166 + +* Fri Feb 16 2018 Kevin Fenzi - 3.4-1 +- Upgrade to 3.4. Fixes bug #1545468 + +* Wed Feb 07 2018 Fedora Release Engineering - 3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Nov 04 2017 Kevin Fenzi - 3.3-1 +- Update to 3.3. Fixes bug #1508669 + +* Wed Aug 02 2017 Fedora Release Engineering - 3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 28 2017 Kevin Fenzi - 3.2-1 +- Update to 3.2. Fixes bug #1465195 + +* Wed Mar 08 2017 Kevin Fenzi - 3.1.7-1 +- Update to 3.1.7. Fixes bug #1429901 + +* Fri Feb 10 2017 Fedora Release Engineering - 3.1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 03 2017 Kevin Fenzi - 3.1.6-1 +- Update to 3.1.6. Fixes bug #1418879 + +* Fri Jan 13 2017 Kevin Fenzi - 3.1.5-1 +- Update to 3.1.5. Fixes bug #1412848 + +* Sat Nov 05 2016 Kevin Fenzi - 3.1.4-1 +- Update to 3.1.4. Fixes bug #1390396 + +* Wed Jun 08 2016 Kevin Fenzi - 3.1.3-1 +- Update to 3.1.3 + +* Thu Feb 04 2016 Fedora Release Engineering - 3.1b3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Oct 08 2015 Susant Sahani 3.1b3 +- Update to 3.1b3 + +* Wed Jun 17 2015 Fedora Release Engineering - 3.0.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon May 04 2015 Susant Sahani 3.0.11-1 +- Update to 3.0.11 + +* Sat Dec 20 2014 Susant Sahani 3.0.10-1 +- Update to 3.0.10 + +* Sat Aug 16 2014 Fedora Release Engineering - 3.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Jul 30 2014 Susant Sahani 3.0.6-1 +- Update to 3.0.6 + +* Thu Jun 19 2014 Susant Sahani 3.0.5-1 +- Update to 3.0.5 + +* Tue Jun 10 2014 Susant Sahani - 3.0.3-5 +- fix compilation BZ #1106803 + +* Sat Jun 07 2014 Fedora Release Engineering - 3.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Apr 2 2014 François Cami - 3.0.3-3 +- Drop static library support (#1081486). +- iperf3-devel subpackage must require iperf3. +- iperf3-devel should only contain the unversioned shared library. +- Call ldconfig since we are installing a shared library now. +- Removed INSTALL file. + +* Wed Apr 2 2014 Susant Sahani 3.0.3-2 +- Moved static library to devel section only . + +* Sun Mar 30 2014 Susant Sahani 3.0.3-1 +- Update to 3.0.3 and added devel rpm support + +* Tue Mar 11 2014 Susant Sahani 3.0.2-1 +- Update to 3.0.2 + +* Tue Jan 14 2014 Susant Sahani 3.0.1-1 +- Update to 3.0.1 + +* Fri Oct 25 2013 Steven Roberts 3.0-1 +- Update to 3.0 + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0-0.5.b5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat May 04 2013 Kevin Fenzi 3.0-0.4.b5 +- Update to 3.0b5 + +* Thu Feb 14 2013 Fedora Release Engineering - 3.0-0.3.b4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 3.0-0.2.b4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 3.0-0.1.b4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Apr 06 2011 G.Balaji 3.0b4-2 +- Changed the Spec name, removed static libs generation and devel +- package. + +* Sat Mar 26 2011 G.Balaji 3.0b4-1 +- Initial Version diff --git a/sources b/sources new file mode 100644 index 0000000..dba81ad --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (iperf-3.5.tar.gz) = 88bb7d8813e727d8ef29f14895d33252baf8a4627ad06728703507c67ca956b1fbdc857855c6b074ccbfcc46bf67cd3db2d59416abf06604dd183b25d7160999