-n broken in iperf 2.0.2
in iperf-2.0.2, -n doesn't work (should limit # of bytes sent, instead
causes it to run forever). I can't find any mention of this in the
mailing list, so I'll report it.
cause:
mAmount is set to the # of bytes to send, then decremented. The code
exits when it's < 0, but it's declared as an unsigned.
here's a simple patch assuming it's OK to sacrifice the sign bit:
line 157 of include/Settings.hpp is:
max_size_t mAmount; // -n or -t
should be:
intmax_t mAmount; // -n or -t
(possibly replace intmax_t with a more generic name added to
headers.h)
Bruce