]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
BIO_set_accept_name(): To accept from any interface, use *
authorRichard Levitte <levitte@openssl.org>
Thu, 7 Sep 2023 03:57:36 +0000 (05:57 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 8 Sep 2023 06:25:08 +0000 (08:25 +0200)
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)

apps/lib/http_server.c

index f406bb062876b63c4feaa2cc4a02f2b05fabef8c..bca2e7110d4570d0f06f6710aab51e3e81652250 100644 (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());