From a460057f2ea16eceacb272f1e509b7b373a98d90 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 8 Mar 2021 15:28:28 +0100 Subject: [PATCH] MINOR: muxes: Add a flag to notify a mux does not support any upgrade 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 | 1 + src/mux_fcgi.c | 2 +- src/mux_h2.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index c5d98e720..2f3296d3b 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -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 */ diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 780d72172..ddb2a60d6 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -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", }; diff --git a/src/mux_h2.c b/src/mux_h2.c index 235eb6d8d..cba19d905 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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", };