diff -Nru iperf-2.0.5+dfsg1/debian/changelog iperf-2.0.5+dfsg1/debian/changelog --- iperf-2.0.5+dfsg1/debian/changelog 2014-07-15 01:29:59.000000000 -0500 +++ iperf-2.0.5+dfsg1/debian/changelog 2018-06-05 12:07:04.000000000 -0500 @@ -1,3 +1,9 @@ +iperf (2.0.5+dfsg1-2ubuntu1) xenial; urgency=medium + + * fix for: iperf2 long time run on 40Gb/s NIC crashes (LP: #1771283) + + -- Manoj Iyer Tue, 05 Jun 2018 12:07:04 -0500 + iperf (2.0.5+dfsg1-2) unstable; urgency=low * Fix hardening building. diff -Nru iperf-2.0.5+dfsg1/debian/control iperf-2.0.5+dfsg1/debian/control --- iperf-2.0.5+dfsg1/debian/control 2014-07-04 05:49:40.000000000 -0500 +++ iperf-2.0.5+dfsg1/debian/control 2018-06-05 12:07:04.000000000 -0500 @@ -1,7 +1,8 @@ Source: iperf Section: net Priority: optional -Maintainer: Roberto Lumbreras +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Roberto Lumbreras Build-Depends: cdbs, debhelper (>= 9), autotools-dev, patchutils Standards-Version: 3.9.5 Homepage: http://iperf.sourceforge.net/ diff -Nru iperf-2.0.5+dfsg1/debian/patches/015-fix-for-iperf2-long-time-run-on-40Gb-s-NIC-crashes-f.patch iperf-2.0.5+dfsg1/debian/patches/015-fix-for-iperf2-long-time-run-on-40Gb-s-NIC-crashes-f.patch --- iperf-2.0.5+dfsg1/debian/patches/015-fix-for-iperf2-long-time-run-on-40Gb-s-NIC-crashes-f.patch 1969-12-31 18:00:00.000000000 -0600 +++ iperf-2.0.5+dfsg1/debian/patches/015-fix-for-iperf2-long-time-run-on-40Gb-s-NIC-crashes-f.patch 2018-06-05 12:06:56.000000000 -0500 @@ -0,0 +1,176 @@ +From fce3254827eb05fee56aa6a2e9f0d69cbe599a69 Mon Sep 17 00:00:00 2001 +From: Robert McMahon +Date: Sat, 2 Jun 2018 11:48:22 -0700 +Subject: [PATCH] fix for: iperf2 long time run on 40Gb/s NIC crashes, found + ubuntu Bug #1771283, reported by Ike Panhc, increase format support to Peta + as well + +--- + include/Reporter.h | 3 +- + include/version.h | 2 +- + src/Reporter.c | 2 +- + src/stdio.c | 73 ++++++++++++++++++++++++++-------------------- + 4 files changed, 46 insertions(+), 34 deletions(-) + +--- a/include/Reporter.h ++++ b/include/Reporter.h +@@ -208,7 +208,8 @@ extern report_serverstatistics serversta + + extern report_statistics multiple_reports[]; + +-extern char buffer[64]; // Buffer for printing ++#define SNBUFFERSIZE 120 ++extern char buffer[SNBUFFERSIZE]; // Buffer for printing + + #define rMillion 1000000 + +--- a/include/version.h ++++ b/include/version.h +@@ -1,2 +1,2 @@ + #define IPERF_VERSION "2.0.5" +-#define IPERF_VERSION_DATE "08 Jul 2010" ++#define IPERF_VERSION_DATE "2 June 2018" +--- a/src/Reporter.c ++++ b/src/Reporter.c +@@ -108,7 +108,7 @@ report_statistics multiple_reports[kRepo + CSV_stats + }; + +-char buffer[64]; // Buffer for printing ++char buffer[SNBUFFERSIZE]; // Buffer for printing + ReportHeader *ReportRoot = NULL; + extern Condition ReportCond; + extern Condition ReportDoneCond; +--- a/src/stdio.c ++++ b/src/stdio.c +@@ -135,25 +135,31 @@ enum { + kConv_Unit, + kConv_Kilo, + kConv_Mega, +- kConv_Giga ++ kConv_Giga, ++ kConv_Tera, ++ kConv_Peta + }; + + /* factor to multiply the number by */ + const double kConversion[] = + { +- 1.0, /* unit */ +- 1.0 / 1024, /* kilo */ +- 1.0 / 1024 / 1024, /* mega */ +- 1.0 / 1024 / 1024 / 1024 /* giga */ ++ 1.0, /* unit */ ++ 1.0 / 1024, /* kilo */ ++ 1.0 / 1024 / 1024, /* mega */ ++ 1.0 / 1024 / 1024 / 1024, /* giga */ ++ 1.0 / 1024 / 1024 / 1024 / 1024, /* tera */ ++ 1.0 / 1024 / 1024 / 1024 / 1024 / 1024 /* peta */ + }; + + /* factor to multiply the number by for bits*/ + const double kConversionForBits[] = + { +- 1.0, /* unit */ +- 1.0 / 1000, /* kilo */ +- 1.0 / 1000 / 1000, /* mega */ +- 1.0 / 1000 / 1000 / 1000 /* giga */ ++ 1.0, /* unit */ ++ 1.0 / 1000, /* kilo */ ++ 1.0 / 1000 / 1000, /* mega */ ++ 1.0 / 1000 / 1000 / 1000, /* giga */ ++ 1.0 / 1000 / 1000 / 1000 / 1000, /* tera */ ++ 1.0 / 1000 / 1000 / 1000 / 1000/ 1000 /* peta */ + }; + + +@@ -163,7 +169,9 @@ const char* kLabel_Byte[] = + "Byte", + "KByte", + "MByte", +- "GByte" ++ "GByte", ++ "TByte", ++ "PByte" + }; + + /* labels for bit formats [kmg] */ +@@ -172,7 +180,9 @@ const char* kLabel_bit[] = + "bit", + "Kbit", + "Mbit", +- "Gbit" ++ "Gbit", ++ "Tbit", ++ "Pbit" + }; + + /* ------------------------------------------------------------------- +@@ -180,8 +190,8 @@ const char* kLabel_bit[] = + * + * Given a number in bytes and a format, converts the number and + * prints it out with a bits or bytes label. +- * B, K, M, G, A for Byte, Kbyte, Mbyte, Gbyte, adaptive byte +- * b, k, m, g, a for bit, Kbit, Mbit, Gbit, adaptive bit ++ * B, K, M, G, A, P, T for Byte, Kbyte, Mbyte, Gbyte, Tbyte, Pbyte adaptive byte ++ * b, k, m, g, a, p, t for bit, Kbit, Mbit, Gbit, Tbit, Pbit, adaptive bit + * adaptive picks the "best" one based on the number. + * outString should be at least 11 chars long + * (4 digits + space + 5 chars max + null) +@@ -189,7 +199,7 @@ const char* kLabel_bit[] = + + void byte_snprintf( char* outString, int inLen, + double inNum, char inFormat ) { +- int conv; ++ int conv = 0; + const char* suffix; + const char* format; + +@@ -203,25 +213,27 @@ void byte_snprintf( char* outString, int + case 'K': conv = kConv_Kilo; break; + case 'M': conv = kConv_Mega; break; + case 'G': conv = kConv_Giga; break; ++ case 'T': conv = kConv_Tera; break; ++ case 'P': conv = kConv_Peta; break; + + default: + case 'A': { +- double tmpNum = inNum; +- conv = kConv_Unit; ++ double tmpNum = inNum; ++ conv = kConv_Unit; + +- if ( isupper((int)inFormat) ) { +- while ( tmpNum >= 1024.0 && conv <= kConv_Giga ) { +- tmpNum /= 1024.0; +- conv++; +- } +- } else { +- while ( tmpNum >= 1000.0 && conv <= kConv_Giga ) { +- tmpNum /= 1000.0; +- conv++; +- } +- } +- break; +- } ++ if ( isupper((int)inFormat) ) { ++ while ( tmpNum >= 1024.0 && conv < kConv_Peta ) { ++ tmpNum /= 1024.0; ++ conv++; ++ } ++ } else { ++ while ( tmpNum >= 1000.0 && conv < kConv_Peta ) { ++ tmpNum /= 1000.0; ++ conv++; ++ } ++ } ++ break; ++ } + } + + if ( ! isupper ((int)inFormat) ) { +@@ -279,4 +291,3 @@ void redirect(const char *inOutputFileNa + #ifdef __cplusplus + } /* end extern "C" */ + #endif +- diff -Nru iperf-2.0.5+dfsg1/debian/patches/series iperf-2.0.5+dfsg1/debian/patches/series --- iperf-2.0.5+dfsg1/debian/patches/series 2014-07-15 01:40:39.000000000 -0500 +++ iperf-2.0.5+dfsg1/debian/patches/series 2018-06-05 12:05:51.000000000 -0500 @@ -9,3 +9,4 @@ 012-nomaxcpu.patch 013-delete-service.patch 014-ipv6_trafficclass_support.patch +015-fix-for-iperf2-long-time-run-on-40Gb-s-NIC-crashes-f.patch