fix -m with QMUX
Some checks failed
Contrib / admin/halog/ (push) Has been cancelled
Contrib / dev/flags/ (push) Has been cancelled
Contrib / dev/haring/ (push) Has been cancelled
Contrib / dev/hpack/ (push) Has been cancelled
Contrib / dev/poll/ (push) Has been cancelled
VTest / Generate Build Matrix (push) Has been cancelled
Windows / Windows, gcc, all features (push) Has been cancelled
VTest / (push) Has been cancelled

This is the same fix as the previous one for QUIC.
This commit is contained in:
Frederic Lecaille 2026-06-23 10:23:47 +02:00
parent 9ca34e48b3
commit 5f3cce562a
3 changed files with 11 additions and 3 deletions

View file

@ -15,6 +15,7 @@ struct hld_path {
struct hld_url_cfg {
int ssl;
int is_quic;
int is_h3;
int h2c;
char *addr;
char *raw_addr; // used only to set the host header value

View file

@ -1259,11 +1259,12 @@ struct task *hld_strm_task(struct task *t, void *context, unsigned int state)
/* Note that the user task will release all the expired streams
* attached to it.
*/
/* Note that for QUIC, the number of available streams is not
/* Note that for QUIC and QMUX, the number of available streams is not
* incremented as soon as a stream is completed (fin=1).
* For H1, here this number is always 0.
*/
if (!url->cfg->is_quic || hs->conn->mux->avail_streams(hs->conn))
if ((!url->cfg->is_quic && !url->cfg->is_h3) ||
hs->conn->mux->avail_streams(hs->conn))
task_wakeup(usr->task, TASK_WOKEN_IO);
LIST_DELETE(&hs->list);

View file

@ -12,7 +12,7 @@
static int hld_debug;
struct hld_url_cfg *hld_url_cfgs;
char *srv_opts, *tls_ciphers, *tls_ciphersuites, *tls_curves, *alpn;
int h2c;
int h2c, is_h3;
static void hld_usage(char *name, int argc)
{
@ -260,6 +260,7 @@ static struct hld_url_cfg *hld_alloc_url(char *url)
hld_url_cfg->ssl = ssl;
hld_url_cfg->is_quic = is_quic;
hld_url_cfg->is_h3 = is_h3;
hld_url_cfg->h2c = h2c;
hld_url_cfg->addr = addr;
hld_url_cfg->raw_addr = raw_addr;
@ -470,26 +471,31 @@ void haproxy_init_args(int argc, char **argv)
strcmp(opt, "h0") == 0) {
alpn = "hq-interop";
h2c = 0;
is_h3 = 0;
}
else if (strcmp(opt, "1") == 0 ||
strcmp(opt, "h1") == 0) {
alpn = "http/1.1";
h2c = 0;
is_h3 = 0;
}
else if (strcmp(opt, "2") == 0 ||
strcmp(opt, "h2") == 0) {
alpn = "h2";
h2c = 0;
is_h3 = 0;
}
else if (strcmp(opt, "2c") == 0 ||
strcmp(opt, "h2c") == 0) {
alpn = NULL;
h2c = 1;
is_h3 = 0;
}
else if (strcmp(opt, "3") == 0 ||
strcmp(opt, "h3") == 0) {
alpn = "h3";
h2c = 0;
is_h3 = 1;
}
else if (*opt == 'd') {
opt++;