From 8a6f6aff73437174ce21d2f8026cbebdb1c8b992 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Tue, 20 Oct 2026 10:15:57 +0200 Subject: [PATCH] package/iperf3: fix build with LibreSSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iperf3 3.22 added a new "goto errreturn" to decrypt_rsa_message(), on a code path that is common to all OpenSSL versions, but the errreturn label is only defined when OPENSSL_VERSION_MAJOR >= 3. LibreSSL does not define OPENSSL_VERSION_MAJOR, so the build fails with: iperf_auth.c: In function 'decrypt_rsa_message': iperf_auth.c:343:9: error: label 'errreturn' used but not defined 343 | goto errreturn; /* or: return 0; — never read more than output_buffer_len bytes */ | ^~~~ Backport the upstream commit that defines the label unconditionally. This issue has been present since commit cb129a641b40 ("package/iperf3: security bump version to 3.22"), as the broken code first appeared in iperf 3.22. That commit is not part of any release nor of any maintenance branch yet, so only master is affected, but this fix should go along with the 3.22 bump if it gets backported. Fixes: https://autobuild.buildroot.org/results/6ed8f60f56f7fcd11eaa1ba160837275b8113e1a Fixes: cb129a641b403cfc4c1b2ea9280b966e19837b62 ("package/iperf3: security bump version to 3.22") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni --- ...penSSL-version-check-in-iperf_auth.c.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch diff --git a/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch b/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch new file mode 100644 index 0000000000..45b581e5a7 --- /dev/null +++ b/package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch @@ -0,0 +1,29 @@ +From 96208f2e413d7fddc19e6888be5fbd2acdb04606 Mon Sep 17 00:00:00 2001 +From: Peter G <55786000+WatcherOfTheSkies@users.noreply.github.com> +Date: Wed, 30 Sep 2026 12:27:43 +0100 +Subject: [PATCH] Remove OpenSSL version check in iperf_auth.c + +Removed conditional compilation for OpenSSL version check. + +Upstream: https://github.com/esnet/iperf/commit/96208f2e413d7fddc19e6888be5fbd2acdb04606 +Signed-off-by: Yegor Yefremov +--- + src/iperf_auth.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/iperf_auth.c b/src/iperf_auth.c +index 51d1a1b6e..cf0bd7449 100644 +--- a/src/iperf_auth.c ++++ b/src/iperf_auth.c +@@ -380,11 +380,9 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt + + return plaintext_len; + +-#if OPENSSL_VERSION_MAJOR >= 3 + errreturn: + fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL)); + return 0; +-#endif + } + + int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken, int use_pkcs1_padding){