From: Willy Tarreau Date: Tue, 26 Apr 2022 09:54:08 +0000 (+0200) Subject: MINOR: connection: add flag MX_FL_FRAMED to mark muxes relying on framed xprt X-Git-Tag: v2.6-dev11~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5821e12cebe88c7035f6c96ac933bb4e1b54486;p=thirdparty%2Fhaproxy.git MINOR: connection: add flag MX_FL_FRAMED to mark muxes relying on framed xprt In order to be able to check compatibility between muxes and transport layers, we'll need a new flag to tag muxes that work on framed transport layers like QUIC. Only QUIC has this flag now. --- diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index ca7819616f..77b43b8421 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -280,6 +280,7 @@ enum { MX_FL_HTX = 0x00000001, /* set if it is an HTX multiplexer */ MX_FL_HOL_RISK = 0x00000002, /* set if the protocol is subject the to head-of-line blocking on server */ MX_FL_NO_UPG = 0x00000004, /* set if mux does not support any upgrade */ + MX_FL_FRAMED = 0x00000008, /* mux working on top of a framed transport layer (QUIC) */ }; /* PROTO token registration */ diff --git a/src/connection.c b/src/connection.c index 2ead714700..dd1898bf92 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1707,6 +1707,9 @@ void list_mux_proto(FILE *out) if (item->mux->flags & MX_FL_NO_UPG) done |= fprintf(out, "%sNO_UPG", done ? "|" : ""); + if (item->mux->flags & MX_FL_FRAMED) + done |= fprintf(out, "%sFRAMED", done ? "|" : ""); + fprintf(out, "\n"); } } diff --git a/src/mux_quic.c b/src/mux_quic.c index 77bb7aea4b..4c240c8b22 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1678,7 +1678,7 @@ static const struct mux_ops qc_ops = { .subscribe = qc_subscribe, .unsubscribe = qc_unsubscribe, .wake = qc_wake, - .flags = MX_FL_HTX|MX_FL_NO_UPG, + .flags = MX_FL_HTX|MX_FL_NO_UPG|MX_FL_FRAMED, .name = "QUIC", };