BIO_set_accept_name(): To accept from any interface, use *

Using "*:{port}" is preferred to "[::]:{port}", because it won't break on
IPv4-only machines.

This fixes test failures in 79-test_http.t and 80-test_ssl_new.t on machines
without IPv6.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21989)
This commit is contained in:
Richard Levitte 2023-09-07 05:57:36 +02:00
parent b9a189ce87
commit b0da24bd2d
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ BIO *http_server_init(const char *prog, const char *port, int verb)
int port_num;
char name[40];
snprintf(name, sizeof(name), "[::]:%s", port); /* port may be "0" */
snprintf(name, sizeof(name), "*:%s", port); /* port may be "0" */
if (verb >= 0 && !log_set_verbosity(prog, verb))
return NULL;
bufbio = BIO_new(BIO_f_buffer());