]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test/quicapitest.c: skip test_quic_peer_addr_v6() if IPv6 is disabled
authorEugene Syromiatnikov <esyr@openssl.org>
Thu, 26 Mar 2026 04:40:04 +0000 (05:40 +0100)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 15 Apr 2026 12:44:58 +0000 (14:44 +0200)
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)

test/quicapitest.c

index 0d79ceb7f253ffdd7f019c77864e36bb2d1aa1fc..eaaf93efe1a61058b831a6f23303708cbc5c2510 100644 (file)
@@ -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);