]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
http_server.{c,h}: make clear that IPv4 or IPv6 is used by http_server_init()
authorDavid von Oheimb <dev@ddvo.net>
Wed, 31 Jul 2024 17:36:16 +0000 (19:36 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 23 Sep 2024 20:15:49 +0000 (22:15 +0200)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25010)

apps/lib/http_server.c

index a5a86ecbc54c63d99ec54b3e46de4d8b7c860c9a..8136228b32d0ff9ab7927624e7da80af6b2a2614 100644 (file)
@@ -204,6 +204,7 @@ BIO *http_server_init(const char *prog, const char *port, int verb)
         goto err;
     acbio = BIO_new(BIO_s_accept());
     if (acbio == NULL
+        || BIO_set_accept_ip_family(acbio, BIO_FAMILY_IPANY) <= 0 /* IPv4/6 */
         || BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) <= 0
         || BIO_set_accept_name(acbio, name) <= 0) {
         log_HTTP(prog, LOG_ERR, "error setting up accept BIO");