summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch')
-rw-r--r--meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch b/meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch
new file mode 100644
index 0000000000..83401489ae
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf/iperf-2.0.4/004-svn-r43-ro.patch
@@ -0,0 +1,117 @@
1Import Debian patches and fix a lot of real bugs.
2
3Upstream-Status: Inappropriate [not author. Above message was get from oe.dev c10c33f86903c93611023197a7f812459c2dfe2d]
4
5--- iperf-2.0.4-4/AUTHORS 2009-07-06 12:02:24.159696747 +0200
6+++ iperf-2.0.4/AUTHORS 2009-07-06 12:14:32.236079541 +0200
7@@ -28,3 +28,7 @@
8
9 Stephen Hemminger <shemminger@linux-foundation.org>
10 * Linux congestion control selection and theading improvements
11+
12+Nathan Jones <nmjones@users.sourceforge.net>
13+ * patch for underflow when value specified in -n is not a multiple of -l
14+
15--- iperf-2.0.4-4/ChangeLog 2009-07-06 12:02:24.166276642 +0200
16+++ iperf-2.0.4/ChangeLog 2009-07-06 12:15:28.883699655 +0200
17@@ -1,3 +1,18 @@
18+2008-05-09 Jon Dugan <jdugan@x1024.net>
19+
20+* change currLen to unsigned to squelch warning generated by Nathan's patch
21+
22+2008-05-09 Nathan Jones <nmjones@users.sourceforge.net>
23+
24+* prevent underflow when the amount of data to be transmitted (-n) is not a
25+multiple of the buffer size (-l) Patch:
26+https://sourceforge.net/tracker/index.php?func=detail&aid=1943432&group_id=128336&atid=711373
27+
28+2008-04-08 Jon Dugan <jdugan@x1024.net>
29+
30+* print report headers only once
31+* use appropriate report header for UDP tests
32+
33 2008-04-07 Jon Dugan <jdugan@x1024.net>
34
35 * Add man page to autoconf goo
36diff -urN 204orig/src/Client.cpp trunk/src/Client.cpp
37--- 204orig/src/Client.cpp 2008-04-08 04:37:54.000000000 +0200
38+++ trunk/src/Client.cpp 2008-05-10 05:18:35.000000000 +0200
39@@ -116,7 +116,7 @@
40 const int kBytes_to_Bits = 8;
41
42 void Client::RunTCP( void ) {
43- long currLen = 0;
44+ unsigned long currLen = 0;
45 struct itimerval it;
46 max_size_t totLen = 0;
47
48@@ -170,7 +170,12 @@
49 }
50
51 if ( !mMode_Time ) {
52- mSettings->mAmount -= currLen;
53+ /* mAmount may be unsigned, so don't let it underflow! */
54+ if( mSettings->mAmount >= currLen ) {
55+ mSettings->mAmount -= currLen;
56+ } else {
57+ mSettings->mAmount = 0;
58+ }
59 }
60
61 } while ( ! (sInterupted ||
62@@ -198,7 +203,7 @@
63
64 void Client::Run( void ) {
65 struct UDP_datagram* mBuf_UDP = (struct UDP_datagram*) mBuf;
66- long currLen = 0;
67+ unsigned long currLen = 0;
68
69 int delay_target = 0;
70 int delay = 0;
71@@ -310,7 +315,12 @@
72 delay_loop( delay );
73 }
74 if ( !mMode_Time ) {
75- mSettings->mAmount -= currLen;
76+ /* mAmount may be unsigned, so don't let it underflow! */
77+ if( mSettings->mAmount >= currLen ) {
78+ mSettings->mAmount -= currLen;
79+ } else {
80+ mSettings->mAmount = 0;
81+ }
82 }
83
84 } while ( ! (sInterupted ||
85diff -urN 204orig/src/ReportDefault.c trunk/src/ReportDefault.c
86--- 204orig/src/ReportDefault.c 2008-04-08 04:37:54.000000000 +0200
87+++ trunk/src/ReportDefault.c 2008-04-09 02:08:11.000000000 +0200
88@@ -67,6 +67,7 @@
89 * Prints transfer reports in default style
90 */
91 void reporter_printstats( Transfer_Info *stats ) {
92+ static char header_printed = 0;
93
94 byte_snprintf( buffer, sizeof(buffer)/2, (double) stats->TotalLen,
95 toupper( stats->mFormat));
96@@ -76,13 +77,19 @@
97
98 if ( stats->mUDP != (char)kMode_Server ) {
99 // TCP Reporting
100- printf( report_bw_header);
101+ if( !header_printed ) {
102+ printf( report_bw_header);
103+ header_printed = 1;
104+ }
105 printf( report_bw_format, stats->transferID,
106 stats->startTime, stats->endTime,
107 buffer, &buffer[sizeof(buffer)/2] );
108 } else {
109 // UDP Reporting
110- printf( report_bw_jitter_loss_header);
111+ if( !header_printed ) {
112+ printf( report_bw_jitter_loss_header);
113+ header_printed = 1;
114+ }
115 printf( report_bw_jitter_loss_format, stats->transferID,
116 stats->startTime, stats->endTime,
117 buffer, &buffer[sizeof(buffer)/2],