BUG/MINOR: check: ensure checks are compatible with QUIC servers

Previously, checks were only performed on TCP. However, QUIC is now
supported on backend. Prior to this patch, check activation for QUIC
servers would result in a crash.

To ensure compatibility between QUIC servers and checks, adjust
protocol_lookup() performed during check connect step. Instead of using
a hardcoded PROTO_TYPE_STREAM, the value is now derived from server
settings.

This does not need to be backported.
This commit is contained in:
Amaury Denoyelle 2025-09-09 10:46:47 +02:00
parent c6d33c09fc
commit cd3027a7ee

View File

@ -1399,7 +1399,9 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec
*conn->dst = (is_addr(&connect->addr)
? connect->addr
: (is_addr(&check->addr) ? check->addr : s->addr));
proto = protocol_lookup(conn->dst->ss_family, PROTO_TYPE_STREAM, 0);
proto = s ?
protocol_lookup(conn->dst->ss_family, s->addr_type.proto_type, s->alt_proto) :
protocol_lookup(conn->dst->ss_family, PROTO_TYPE_STREAM, 0);
port = 0;
if (connect->port)