diff options
author | Frank LENORMAND <lenormf@gmail.com> | 2018-12-13 21:32:49 +0000 |
---|---|---|
committer | Bruce A. Mah <bmah@kitchenlab.org> | 2018-12-13 13:32:49 -0800 |
commit | 901ad59c83e7759faaa185c8d70662b2fe9ffb99 (patch) | |
tree | 72c4a4f84d8b6e725a72dfe5cf7edb4c2a79462f | |
parent | 0778f04c9864fc7e4c91eee05cb51ed08b64e7ee (diff) | |
download | iperf3-901ad59c83e7759faaa185c8d70662b2fe9ffb99.tar.gz |
tcp sctp: Let the system pick the largest possible backlog value for `listen()` (#827)
This commit applies the same changes made by b481169 (#693), to the
TCP and SCTP server sockets.
-rw-r--r-- | src/iperf_sctp.c | 3 | ||||
-rw-r--r-- | src/iperf_tcp.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/iperf_sctp.c b/src/iperf_sctp.c index 810cac4..c1cb134 100644 --- a/src/iperf_sctp.c +++ b/src/iperf_sctp.c @@ -37,6 +37,7 @@ #include <netdb.h> #include <sys/time.h> #include <sys/select.h> +#include <limits.h> #ifdef HAVE_NETINET_SCTP_H #include <netinet/sctp.h> @@ -234,7 +235,7 @@ iperf_sctp_listen(struct iperf_test *test) freeaddrinfo(res); - if (listen(s, 5) < 0) { + if (listen(s, INT_MAX) < 0) { i_errno = IESTREAMLISTEN; return -1; } diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c index e16203a..f6ef78f 100644 --- a/src/iperf_tcp.c +++ b/src/iperf_tcp.c @@ -35,6 +35,7 @@ #include <netdb.h> #include <sys/time.h> #include <sys/select.h> +#include <limits.h> #include "iperf.h" #include "iperf_api.h" @@ -301,7 +302,7 @@ iperf_tcp_listen(struct iperf_test *test) freeaddrinfo(res); - if (listen(s, 5) < 0) { + if (listen(s, INT_MAX) < 0) { i_errno = IESTREAMLISTEN; return -1; } |