aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iperf_udp.c')
-rw-r--r--src/iperf_udp.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/iperf_udp.c b/src/iperf_udp.c
index 03b94d7..c92be55 100644
--- a/src/iperf_udp.c
+++ b/src/iperf_udp.c
@@ -252,13 +252,13 @@ iperf_udp_accept(struct iperf_test *test)
i_errno = IESETBUF;
return -1;
}
- if (test->settings->socket_bufsize && test->settings->socket_bufsize != opt) {
+ if (test->debug) {
+ printf("SNDBUF is %u, expecting %u\n", opt, test->settings->socket_bufsize);
+ }
+ if (test->settings->socket_bufsize && test->settings->socket_bufsize > opt) {
i_errno = IESETBUF2;
return -1;
}
- if (test->debug) {
- printf("SO_SNDBUF is %u\n", opt);
- }
/* Read back and verify the receiver socket buffer size */
optlen = sizeof(opt);
@@ -266,13 +266,13 @@ iperf_udp_accept(struct iperf_test *test)
i_errno = IESETBUF;
return -1;
}
- if (test->settings->socket_bufsize && test->settings->socket_bufsize != opt) {
+ if (test->debug) {
+ printf("RCVBUF is %u, expecting %u\n", opt, test->settings->socket_bufsize);
+ }
+ if (test->settings->socket_bufsize && test->settings->socket_bufsize > opt) {
i_errno = IESETBUF2;
return -1;
}
- if (test->debug) {
- printf("SO_RCVBUF is %u\n", opt);
- }
#if defined(HAVE_SO_MAX_PACING_RATE)
/* If socket pacing is available and not disabled, try it. */
@@ -388,13 +388,13 @@ iperf_udp_connect(struct iperf_test *test)
i_errno = IESETBUF;
return -1;
}
- if (test->settings->socket_bufsize && test->settings->socket_bufsize != opt) {
+ if (test->debug) {
+ printf("SNDBUF is %u, expecting %u\n", opt, test->settings->socket_bufsize);
+ }
+ if (test->settings->socket_bufsize && test->settings->socket_bufsize > opt) {
i_errno = IESETBUF2;
return -1;
}
- if (test->debug) {
- printf("SO_SNDBUF is %u\n", opt);
- }
/* Read back and verify the receiver socket buffer size */
optlen = sizeof(opt);
@@ -402,13 +402,13 @@ iperf_udp_connect(struct iperf_test *test)
i_errno = IESETBUF;
return -1;
}
- if (test->settings->socket_bufsize && test->settings->socket_bufsize != opt) {
+ if (test->debug) {
+ printf("RCVBUF is %u, expecting %u\n", opt, test->settings->socket_bufsize);
+ }
+ if (test->settings->socket_bufsize && test->settings->socket_bufsize > opt) {
i_errno = IESETBUF2;
return -1;
}
- if (test->debug) {
- printf("SO_RCVBUF is %u\n", opt);
- }
#if defined(HAVE_SO_MAX_PACING_RATE)
/* If socket pacing is available and not disabled, try it. */