]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: config: provide cleare hints about unsupported QUIC addresses
authorWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 15:32:35 +0000 (17:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 16:39:43 +0000 (18:39 +0200)
We now detect that QUIC was likely requested, and if it's not compiled
it, we clearly mention it.

src/tools.c

index 71337aa6412a889d20c1ce2b1a3ad6fc57332fbc..9e629e5bd855269de2d956b90b76bc269bfe9f42 100644 (file)
@@ -1300,11 +1300,18 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int
                                            ctrl_type == SOCK_DGRAM);
 
                if (!new_proto && (!fqdn || !*fqdn) && (ss.ss_family != AF_CUST_EXISTING_FD)) {
-                       memprintf(err, "unsupported %s protocol for %s family %d address '%s'",
+                       memprintf(err, "unsupported %s protocol for %s family %d address '%s'%s",
                                  (ctrl_type == SOCK_DGRAM) ? "datagram" : "stream",
                                  (proto_type == PROTO_TYPE_DGRAM) ? "datagram" : "stream",
                                  ss.ss_family,
-                                 str);
+                                 str,
+                                 (ctrl_type == SOCK_STREAM && proto_type == PROTO_TYPE_DGRAM) ?
+#ifndef USE_QUIC
+                                 "; QUIC is not compiled in if this is what you were looking for."
+#else
+                                 ""
+#endif
+                                 :"");
                        goto out;
                }