summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/iperf/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/iperf/files')
-rw-r--r--net-misc/iperf/files/iperf-3.0.5-flags.patch31
-rw-r--r--net-misc/iperf/files/iperf-bidirectional-tcp-server.patch23
-rw-r--r--net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch20
-rw-r--r--net-misc/iperf/files/iperf-die-on-bind-fail.patch19
-rw-r--r--net-misc/iperf/files/iperf-fix-bandwidth-limit.patch21
-rw-r--r--net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch96
-rw-r--r--net-misc/iperf/files/iperf-ipv6_mcast_check.patch22
-rw-r--r--net-misc/iperf/files/iperf.confd6
-rw-r--r--net-misc/iperf/files/iperf.initd-r115
9 files changed, 253 insertions, 0 deletions
diff --git a/net-misc/iperf/files/iperf-3.0.5-flags.patch b/net-misc/iperf/files/iperf-3.0.5-flags.patch
new file mode 100644
index 000000000000..9c11c282c339
--- /dev/null
+++ b/net-misc/iperf/files/iperf-3.0.5-flags.patch
@@ -0,0 +1,31 @@
+* Do not inject -g
+* Do not make a profiled build
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ lib_LTLIBRARIES = libiperf.la # Build and install an iperf library
+ bin_PROGRAMS = iperf3 # Build and install an iperf binary
+-noinst_PROGRAMS = t_timer t_units t_uuid iperf3_profile # Build, but don't install the test programs and a profiled version of iperf3
++noinst_PROGRAMS = t_timer t_units t_uuid # Build, but don't install the test programs and a profiled version of iperf3
+ include_HEADERS = iperf_api.h # Defines the headers that get installed with the program
+
+
+@@ -37,14 +37,13 @@
+
+ # Specify the sources and various flags for the iperf binary
+ iperf3_SOURCES = main.c
+-iperf3_CFLAGS = -g
++iperf3_CFLAGS =
+ iperf3_LDADD = libiperf.la
+-iperf3_LDFLAGS = -g
++iperf3_LDFLAGS =
+
+ # Specify the sources and various flags for the profiled iperf binary. This
+ # binary recompiles all the source files to make sure they are all profiled.
+-iperf3_profile_SOURCES = main.c \
+- $(libiperf_la_SOURCES)
++iperf3_profile_SOURCES = main.c
+
+ iperf3_profile_CFLAGS = -pg -g
+ iperf3_profile_LDADD = libiperf.la
diff --git a/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
new file mode 100644
index 000000000000..88a1a4f00c4c
--- /dev/null
+++ b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
@@ -0,0 +1,23 @@
+Description: Fix bidirectional TCP server exiting after the test
+ iperf bidirectional test using parameter -r or -d doesn't work as
+ expected, the server exits after the test, but it should continue listening
+ for new connections.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=449796
+Forwarded: http://sourceforge.net/tracker/?func=detail&aid=1983829&group_id=128336&atid=711371
+
+--- a/src/Client.cpp
++++ b/src/Client.cpp
+@@ -212,10 +212,12 @@ void Client::Run( void ) {
+ char* readAt = mBuf;
+
+ #if HAVE_THREAD
++ /*
+ if ( !isUDP( mSettings ) ) {
+ RunTCP();
+ return;
+ }
++ */
+ #endif
+
+ // Indicates if the stream is readable
diff --git a/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
new file mode 100644
index 000000000000..34d37eef671d
--- /dev/null
+++ b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
@@ -0,0 +1,20 @@
+Description: iperf does not handle right large time values
+ Reported by Eugene Butan <eugene@mikrotik.com>
+ When I invoke 'iperf' with '-t 100000000' argument from an ordinary shell
+ prompt it immediately exits displaying incorrect bandwidth. If I supply
+ smaller time value, iperf works as expected.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Debian: http://bugs.debian.org/346099
+Forwarded: https://sourceforge.net/tracker/index.php?func=detail&aid=3140391&group_id=128336&atid=711371
+
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -458,7 +458,7 @@
+ case 't': // seconds to write for
+ // time mode (instead of amount mode)
+ setModeTime( mExtSettings );
+- mExtSettings->mAmount = (int) (atof( optarg ) * 100.0);
++ mExtSettings->mAmount = (max_size_t) (atof( optarg ) * 100.0);
+ break;
+
+ case 'u': // UDP instead of TCP
diff --git a/net-misc/iperf/files/iperf-die-on-bind-fail.patch b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
new file mode 100644
index 000000000000..1f54cf556d29
--- /dev/null
+++ b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
@@ -0,0 +1,19 @@
+Description: iperf die on bind fail
+ When iperf encounters a fatal error when binding to a port, such as
+ the port being already in use or lacking permission, it fails to give
+ fatal error, but instead pretends to continue to listen on the port.
+Author: Deny IP Any Any <denyipanyany@gmail.com>
+Bug-Debian: http://bugs.debian.org/517239
+Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3140400&group_id=128336&atid=711371
+
+--- a/src/Listener.cpp
++++ b/src/Listener.cpp
+@@ -333,7 +333,7 @@
+ #endif
+ {
+ rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local, mSettings->size_local );
+- WARN_errno( rc == SOCKET_ERROR, "bind" );
++ FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
+ }
+ // listen for connections (TCP only).
+ // default backlog traditionally 5
diff --git a/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
new file mode 100644
index 000000000000..eb9df8cd31b3
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
@@ -0,0 +1,21 @@
+
+2011-10-14 Israel G. Lugo <israel.lugo@lugosys.com>
+
+* Fix delay_loop() for delays of 1s and greater. Was causing breakage when a
+low bandwidth limit was specified.
+
+
+--- a/compat/delay.cpp
++++ b/compat/delay.cpp
+@@ -63,8 +63,9 @@ void delay_loop(unsigned long usec)
+ {
+ struct timespec requested, remaining;
+
+- requested.tv_sec = 0;
+- requested.tv_nsec = usec * 1000L;
++ /* convert to seconds; nanosleep requires 0 <= tv_nsec <= 999999999 */
++ requested.tv_sec = usec / 1000000UL;
++ requested.tv_nsec = (usec % 1000000UL) * 1000UL;
+
+ while (nanosleep(&requested, &remaining) == -1)
+ if (errno == EINTR)
diff --git a/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
new file mode 100644
index 000000000000..2f5b03277209
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
@@ -0,0 +1,96 @@
+Description: iperf format string FTBFS with -Werror=format-security
+ Reported by Didier Raboud <odyx@debian.org>
+Author: Simon Paillard <spaillard@debian.org>
+Bug-Debian: http://bugs.debian.org/643408
+
+--- a/compat/Thread.c
++++ b/compat/Thread.c
+@@ -381,7 +381,7 @@
+ Condition_Lock( thread_sNum_cond );
+ thread_sNum -= nonterminating_num;
+ if ( thread_sNum > 1 && nonterminating_num > 0 && interrupt != 0 ) {
+- fprintf( stderr, wait_server_threads );
++ fprintf( stderr, "%s", wait_server_threads );
+ }
+ nonterminating_num = 0;
+ Condition_Signal( &thread_sNum_cond );
+--- a/src/ReportDefault.c
++++ b/src/ReportDefault.c
+@@ -78,7 +78,7 @@
+ if ( stats->mUDP != (char)kMode_Server ) {
+ // TCP Reporting
+ if( !header_printed ) {
+- printf( report_bw_header);
++ printf( "%s", report_bw_header);
+ header_printed = 1;
+ }
+ printf( report_bw_format, stats->transferID,
+@@ -87,7 +87,7 @@
+ } else {
+ // UDP Reporting
+ if( !header_printed ) {
+- printf( report_bw_jitter_loss_header);
++ printf( "%s", report_bw_jitter_loss_header);
+ header_printed = 1;
+ }
+ printf( report_bw_jitter_loss_format, stats->transferID,
+@@ -159,7 +159,7 @@
+ (data->mThreadMode == kMode_Listener ? 0 : 1) );
+ win_requested = data->mTCPWin;
+
+- printf( separator_line );
++ printf( "%s", separator_line );
+ if ( data->mThreadMode == kMode_Listener ) {
+ printf( server_port,
+ (isUDP( data ) ? "UDP" : "TCP"),
+@@ -198,7 +198,7 @@
+ printf( warn_window_requested, buffer );
+ }
+ printf( "\n" );
+- printf( separator_line );
++ printf( "%s", separator_line );
+ }
+
+ /*
+@@ -286,7 +286,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Reporter.c
++++ b/src/Reporter.c
+@@ -896,7 +896,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -375,8 +375,8 @@
+ break;
+
+ case 'h': // print help and exit
+- fprintf(stderr, usage_long1);
+- fprintf(stderr, usage_long2);
++ fprintf(stderr, "%s", usage_long1);
++ fprintf(stderr, "%s", usage_long2);
+ exit(1);
+ break;
+
+@@ -482,7 +482,7 @@
+ break;
+
+ case 'v': // print version and exit
+- fprintf( stderr, version );
++ fprintf( stderr, "%s", version );
+ exit(1);
+ break;
+
diff --git a/net-misc/iperf/files/iperf-ipv6_mcast_check.patch b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
new file mode 100644
index 000000000000..bef05259a4d8
--- /dev/null
+++ b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
@@ -0,0 +1,22 @@
+Description: Fix improper check for IPv6 family when sending multicast
+ This patch fixes the proper behavior of -T (hop-limit setting) when
+ sending IPv6 multicast packets. Due to this bug, it was always fixed to 1.
+ .
+ SetSocketOptions() is called before socket connection, thus sa_family is
+ still set to 0. This is causing the if-branch in the multicast check
+ to always assume a non-IPv6 socket.
+ Checking the remote-peer family works reliably, instead.
+Author: Luca Bruno <lucab@debian.org>
+Last-Update: 2012-05-24
+
+--- a/src/PerfSocket.cpp
++++ b/src/PerfSocket.cpp
+@@ -109,7 +109,7 @@ void SetSocketOptions( thread_Settings *
+ if ( isMulticast( inSettings ) && ( inSettings->mTTL > 0 ) ) {
+ int val = inSettings->mTTL;
+ #ifdef HAVE_MULTICAST
+- if ( !SockAddr_isIPv6( &inSettings->local ) ) {
++ if ( !SockAddr_isIPv6( &inSettings->peer ) ) {
+ int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
+ (const void*) &val, (Socklen_t) sizeof(val));
+
diff --git a/net-misc/iperf/files/iperf.confd b/net-misc/iperf/files/iperf.confd
new file mode 100644
index 000000000000..01bd473328e3
--- /dev/null
+++ b/net-misc/iperf/files/iperf.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# extra options (run iperf -h for a list of supported options)
+IPERF_OPTS="--format Mbytes"
diff --git a/net-misc/iperf/files/iperf.initd-r1 b/net-misc/iperf/files/iperf.initd-r1
new file mode 100644
index 000000000000..dae8cf04ab49
--- /dev/null
+++ b/net-misc/iperf/files/iperf.initd-r1
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="IP bandwidth measurement server"
+command="/usr/bin/iperf"
+
+command_background="yes"
+pidfile="/run/${SVCNAME}.pid"
+command_args="-s ${IPERF_OPTS}"
+
+# note: iperf has a -D/--daemon flag but we seem to hit a bug
+# where it starts to eat all CPU after client disconnect,
+# see bug #344875