]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: muxes: Add a flag to notify a mux does not support any upgrade
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Mar 2021 14:28:28 +0000 (15:28 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Apr 2021 09:06:47 +0000 (11:06 +0200)
MX_FL_NO_UPG flag may now be set on a multiplexer to explicitly disable
upgrades from this mux. For now, it is set on the FCGI multiplexer because
it is not supported and there is no upgrade on backend-only multiplexers. It
is also set on the H2 multiplexer because it is clearly not supported.

include/haproxy/connection-t.h
src/mux_fcgi.c
src/mux_h2.c

index c5d98e720e106502b3e893c02cf757699a0a6cc1..2f3296d3b9a7c02c9394ce3aa64857be64a2299d 100644 (file)
@@ -296,6 +296,7 @@ enum {
        MX_FL_CLEAN_ABRT  = 0x00000001, /* abort is clearly reported as an error */
        MX_FL_HTX         = 0x00000002, /* set if it is an HTX multiplexer */
        MX_FL_HOL_RISK    = 0x00000004, /* set if the protocol is subject the to head-of-line blocking on server */
+       MX_FL_NO_UPG      = 0x00000008, /* set if mux does not support any upgrade */
 };
 
 /* PROTO token registration */
index 780d72172d6c451a73e6ddd3c8fd683e848a0c44..ddb2a60d6bc971695a41ef2ec784563003caf3fd 100644 (file)
@@ -4240,7 +4240,7 @@ static const struct mux_ops mux_fcgi_ops = {
        .ctl           = fcgi_ctl,
        .show_fd       = fcgi_show_fd,
        .takeover      = fcgi_takeover,
-       .flags         = MX_FL_HTX|MX_FL_HOL_RISK,
+       .flags         = MX_FL_HTX|MX_FL_HOL_RISK|MX_FL_NO_UPG,
        .name          = "FCGI",
 };
 
index 235eb6d8d422e6a8c9a8229c3b17323afa1c1b07..cba19d905e823ef7312eb7ac93eb1c5628b8701d 100644 (file)
@@ -6677,7 +6677,7 @@ static const struct mux_ops h2_ops = {
        .ctl = h2_ctl,
        .show_fd = h2_show_fd,
        .takeover = h2_takeover,
-       .flags = MX_FL_CLEAN_ABRT|MX_FL_HTX|MX_FL_HOL_RISK,
+       .flags = MX_FL_CLEAN_ABRT|MX_FL_HTX|MX_FL_HOL_RISK|MX_FL_NO_UPG,
        .name = "H2",
 };