package/iperf3: fix build with LibreSSL
PATCH 1/1 package/iperf3: fix build with LibreSSL
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
--- ...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
package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 96208f2e413d7fddc19e6888be5fbd2acdb04606 Mon Sep 17 00:00:00 2001 +From: Peter G <[email protected]> +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 <[email protected]> +--- + 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){
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 19 lines · Yegor Yefremov
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 whenOPENSSL_VERSION_MAJOR>= 3. LibreSSL does not defineOPENSSL_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 defined343 | 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.
Quoted 6 lines
Fixes:
https://autobuild.buildroot.org/results/6ed8f60f56f7fcd11eaa1ba160837275b8113e1aFixes cb129a641b403cfc4c1b2ea9280b966e19837b62 ("package/iperf3: security bump version to 3.22")Assisted-by Claude:claude-opus-5-5Signed-off-by Yegor Yefremov <[email protected]>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 19 lines
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 whenOPENSSL_VERSION_MAJOR>= 3. LibreSSL does not defineOPENSSL_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 defined343 | 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.
Quoted 6 lines
Fixes:
https://autobuild.buildroot.org/results/6ed8f60f56f7fcd11eaa1ba160837275b8113e1aFixes cb129a641b403cfc4c1b2ea9280b966e19837b62 ("package/iperf3: security bump version to 3.22")Assisted-by Claude:claude-opus-5-5Signed-off-by Yegor Yefremov <[email protected]>
Applied to 2025.02.x, 2026.08.x. Thanks
Quoted 30 lines
--- ...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.patchpackage/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch new file +19
-0@@ -0,0 +1,29 @@ +From 96208f2e413d7fddc19e6888be5fbd2acdb04606 Mon Sep 17 00:00:00 2001 +From: Peter G <[email protected]> +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 <[email protected]> +--- + 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 +
package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch line 29
Quoted 10 lines
package/iperf3/0001-Remove-OpenSSL-version-check-in-iperf_auth.c.patch new file +10
-0+ 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){
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot