From: David von Oheimb Date: Wed, 31 Jul 2024 17:36:16 +0000 (+0200) Subject: http_server.{c,h}: make clear that IPv4 or IPv6 is used by http_server_init() X-Git-Tag: openssl-3.1.8~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67e3bc19b96b16a03b6d03b6753e45e4a30a7a46;p=thirdparty%2Fopenssl.git http_server.{c,h}: make clear that IPv4 or IPv6 is used by http_server_init() Reviewed-by: Viktor Dukhovni Reviewed-by: Tomas Mraz Reviewed-by: Neil Horman Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/25533) (cherry picked from commit 4c91e96390ab6bdbd73decca0a342c679b583e68) --- diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c index 120a5d3c874..33ae886d4a1 100644 --- a/apps/lib/http_server.c +++ b/apps/lib/http_server.c @@ -228,6 +228,7 @@ BIO *http_server_init_bio(const char *prog, const char *port) 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_message(prog, LOG_ERR, "Error setting up accept BIO");