main/iperf > buggy number over 10G
we are under !G connectinos and checks seems are confirmed this are happened>
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965974
patch are available in debian and could be merged! i modified and i prefers to use long
Index: iperf2/src/Client.cpp
===================================================================
--- iperf2.orig/src/Client.cpp
+++ iperf2/src/Client.cpp
@@ -396,7 +396,7 @@ void Client::RunRateLimitedTCP ( void )
double tokens = 0;
Timestamp time1, time2;
- int var_rate = mSettings->mUDPRate;
+ long var_rate = mSettings->mUDPRate;
while (InProgress()) {
// Add tokens per the loop time
// clock_gettime is much cheaper than gettimeofday() so
@@ -504,7 +504,7 @@ void Client::RunUDP( void ) {
if (isVaryLoad(mSettings) && mSettings->mUDPRateUnits == kRate_BW) {
static Timestamp time3;
if (now.subSec(time3) >= VARYLOAD_PERIOD) {
- int var_rate = lognormal(mSettings->mUDPRate,variance);
+ long var_rate = lognormal(mSettings->mUDPRate,variance);
if (var_rate < 0)
var_rate = 0;