Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No limit to omit time period #1774

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/iperf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 > 60) {
if (test->omit < 0 || test->omit > MAX_OMIT_TIME) {
i_errno = IEOMIT;
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/iperf_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down