mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MINOR: cfgparse: enforce QUIC MUX compat on server line
Add postparsing checks to control server line conformity regarding QUIC both on the server address and the MUX protocol. An error is reported in the following case : * proto quic is explicitely specified but server address does not specify quic4/quic6 prefix * another proto is explicitely specified but server address uses quic4/quic6 prefix
This commit is contained in:
parent
e76f1ad171
commit
626cfd85aa
@ -4130,6 +4130,24 @@ int check_config_validity()
|
||||
newsrv->id, newsrv->conf.file, newsrv->conf.line);
|
||||
cfgerr++;
|
||||
}
|
||||
else {
|
||||
if ((mux_ent->mux->flags & MX_FL_FRAMED) && !srv_is_quic(newsrv)) {
|
||||
ha_alert("%s '%s' : MUX protocol '%.*s' is incompatible with stream transport used by server '%s' at [%s:%d].\n",
|
||||
proxy_type_str(curproxy), curproxy->id,
|
||||
(int)newsrv->mux_proto->token.len,
|
||||
newsrv->mux_proto->token.ptr,
|
||||
newsrv->id, newsrv->conf.file, newsrv->conf.line);
|
||||
cfgerr++;
|
||||
}
|
||||
else if (!(mux_ent->mux->flags & MX_FL_FRAMED) && srv_is_quic(newsrv)) {
|
||||
ha_alert("%s '%s' : MUX protocol '%.*s' is incompatible with framed transport used by server '%s' at [%s:%d].\n",
|
||||
proxy_type_str(curproxy), curproxy->id,
|
||||
(int)newsrv->mux_proto->token.len,
|
||||
newsrv->mux_proto->token.ptr,
|
||||
newsrv->id, newsrv->conf.file, newsrv->conf.line);
|
||||
cfgerr++;
|
||||
}
|
||||
}
|
||||
|
||||
/* update the mux */
|
||||
newsrv->mux_proto = mux_ent;
|
||||
|
Loading…
Reference in New Issue
Block a user