Commit 6e6e0d89a2 for openssl.org
commit 6e6e0d89a2fd5bb6b9d30726746230c48d5e8f9f
Author: Eugene Syromiatnikov <esyr@openssl.org>
Date: Thu Mar 26 05:40:04 2026 +0100
test/quicapitest.c: skip test_quic_peer_addr_v6() if IPv6 is disabled
Define and add the test only if OPENSSL_USE_IPV6 is set to 1.
Resolves: https://github.com/openssl/openssl/issues/30574
Fixes: beec4e146a9e "Add SSL_get_peer_addr() function to query peer address for QUIC"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:45:31 2026
(Merged from https://github.com/openssl/openssl/pull/30580)
diff --git a/test/quicapitest.c b/test/quicapitest.c
index 0d79ceb7f2..eaaf93efe1 100644
--- a/test/quicapitest.c
+++ b/test/quicapitest.c
@@ -3419,12 +3419,14 @@ static int test_quic_peer_addr_v4(void)
"127.0.0.2", 4434);
}
+#if OPENSSL_USE_IPV6
static int test_quic_peer_addr_v6(void)
{
return test_quic_peer_addr_common(AF_INET6,
"::1", 4433,
"::2", 4434);
}
+#endif
/* Test ECH with quic */
static int test_ech(void)
@@ -3690,7 +3692,9 @@ int setup_tests(void)
ADD_TEST(test_ssl_set_verify);
ADD_TEST(test_accept_stream);
ADD_TEST(test_client_hello_retry);
+#if OPENSSL_USE_IPV6
ADD_TEST(test_quic_peer_addr_v6);
+#endif
ADD_TEST(test_quic_peer_addr_v4);
ADD_TEST(test_ech);
ADD_TEST(test_quic_resize_txe);