]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log: add '~' to frontend when the transport layer provides SSL
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 06:08:33 +0000 (08:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 06:08:33 +0000 (08:08 +0200)
We used to check if the transport layer was ssl_sock to decide to log
"~" after a frontend's name. Now that QUIC is present, this doesn't work
anymore. Better rely on the transport layer's get_ssl_sock_ctx() method.

src/log.c

index 52cfece53f580a8678fdd17660159e6eef0e40d3..80db27ab89c6eb9c5b21c76aca3391fd84996e95 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -2335,7 +2335,7 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t
                                tmplog += iret;
 
                                /* sess->listener may be undefined if the session's owner is a health-check */
-                               if (sess->listener && sess->listener->bind_conf->xprt == xprt_get(XPRT_SSL))
+                               if (sess->listener && sess->listener->bind_conf->xprt->get_ssl_sock_ctx)
                                        LOGCHAR('~');
                                if (tmp->options & LOG_OPT_QUOTE)
                                        LOGCHAR('"');