diff --git a/src/iperf.h b/src/iperf.h index f297587d1..539c4a17c 100644 --- a/src/iperf.h +++ b/src/iperf.h @@ -447,6 +447,7 @@ struct iperf_test #define MIN_INTERVAL 0.1 #define MAX_INTERVAL 60.0 #define MAX_TIME 86400 +#define MAX_OMIT_TIME 600 #define MAX_BURST 1000 #define MAX_MSS (9 * 1024) #define MAX_STREAMS 128 diff --git a/src/iperf_api.c b/src/iperf_api.c index f5d07084e..c5ac43e27 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -1493,7 +1493,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv) break; case 'O': test->omit = atoi(optarg); - if (test->omit < 0 || test->omit > MAX_TIME) { + if (test->omit < 0 || test->omit > MAX_OMIT_TIME) { i_errno = IEOMIT; return -1; } diff --git a/src/iperf_error.c b/src/iperf_error.c index 3388d376e..e06723ba6 100644 --- a/src/iperf_error.c +++ b/src/iperf_error.c @@ -213,7 +213,7 @@ iperf_strerror(int int_errno) snprintf(errstr, len, "this OS does not support sendfile"); break; case IEOMIT: - snprintf(errstr, len, "bogus value for --omit"); + snprintf(errstr, len, "bogus value for --omit (maximum = %d seconds)", MAX_OMIT_TIME); break; case IEUNIMP: snprintf(errstr, len, "an option you are trying to set is not implemented yet");