From 2a7536868c998e2bd89826065555e55b8cd1cafa Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 17:21:50 +0000 Subject: Prepare for a new update Reverting patches so we can apply the latest update and changes can be seen in the spec file and sources. --- diff --git a/src/iperf3.1 b/src/iperf3.1 index 1be8cc3..639d5a4 100644 --- a/src/iperf3.1 +++ b/src/iperf3.1 @@ -350,13 +350,6 @@ If the client is run with \fB--json\fR, the server output is included in a JSON object; otherwise it is appended at the bottom of the human-readable output. .TP -.BR --udp-counters-64bit -Use 64-bit counters in UDP test packets. -The use of this option can help prevent counter overflows during long -or high-bitrate UDP tests. Both client and server need to be running -at least version 3.1 for this option to work. It may become the -default behavior at some point in the future. -.TP .BR --username " \fIusername\fR" username to use for authentication to the iperf server (if built with OpenSSL support). diff --git a/src/iperf_sctp.c b/src/iperf_sctp.c index d517b96..a0869a3 100644 --- a/src/iperf_sctp.c +++ b/src/iperf_sctp.c @@ -130,14 +130,12 @@ iperf_sctp_accept(struct iperf_test * test) if (Nread(s, cookie, COOKIE_SIZE, Psctp) < 0) { i_errno = IERECVCOOKIE; - close(s); return -1; } - if (strncmp(test->cookie, cookie, COOKIE_SIZE) != 0) { + if (strcmp(test->cookie, cookie) != 0) { if (Nwrite(s, (char*) &rbuf, sizeof(rbuf), Psctp) < 0) { i_errno = IESENDMESSAGE; - close(s); return -1; } close(s); @@ -211,11 +209,9 @@ iperf_sctp_listen(struct iperf_test *test) /* servers must call sctp_bindx() _instead_ of bind() */ if (!TAILQ_EMPTY(&test->xbind_addrs)) { - if (iperf_sctp_bindx(test, s, IPERF_SCTP_SERVER)) { - close(s); - freeaddrinfo(res); + freeaddrinfo(res); + if (iperf_sctp_bindx(test, s, IPERF_SCTP_SERVER)) return -1; - } } else if (bind(s, (struct sockaddr *) res->ai_addr, res->ai_addrlen) < 0) { saved_errno = errno; @@ -426,11 +422,8 @@ iperf_sctp_connect(struct iperf_test *test) /* clients must call bind() followed by sctp_bindx() before connect() */ if (!TAILQ_EMPTY(&test->xbind_addrs)) { - if (iperf_sctp_bindx(test, s, IPERF_SCTP_CLIENT)) { - freeaddrinfo(server_res); - close(s); + if (iperf_sctp_bindx(test, s, IPERF_SCTP_CLIENT)) return -1; - } } /* TODO support sctp_connectx() to avoid heartbeating. */ @@ -442,12 +435,12 @@ iperf_sctp_connect(struct iperf_test *test) i_errno = IESTREAMCONNECT; return -1; } + freeaddrinfo(server_res); /* Send cookie for verification */ if (Nwrite(s, test->cookie, COOKIE_SIZE, Psctp) < 0) { saved_errno = errno; close(s); - freeaddrinfo(server_res); errno = saved_errno; i_errno = IESENDCOOKIE; return -1; @@ -471,7 +464,6 @@ iperf_sctp_connect(struct iperf_test *test) return -1; } - freeaddrinfo(server_res); return s; #else i_errno = IENOSCTP;