CLEANUP: listener: replace bind_conf->quic_force_retry with BC_O_QUIC_FORCE_RETRY
It was only set and used once, let's replace it now and take it out of
the ifdef.
diff --git a/include/haproxy/listener-t.h b/include/haproxy/listener-t.h
index ac50a46..6f4ae2f 100644
--- a/include/haproxy/listener-t.h
+++ b/include/haproxy/listener-t.h
@@ -116,6 +116,7 @@
/* flags used with bind_conf->options */
#define BC_O_USE_SSL 0x00000001 /* SSL is being used on this bind_conf */
#define BC_O_GENERATE_CERTS 0x00000002 /* 1 if generate-certificates option is set, else 0 */
+#define BC_O_QUIC_FORCE_RETRY 0x00000004 /* always send Retry on reception of Initial without token */
/* flags used with bind_conf->ssl_options */
@@ -176,7 +177,6 @@
#endif
#ifdef USE_QUIC
struct quic_transport_params quic_params; /* QUIC transport parameters. */
- unsigned int quic_force_retry:1; /* always send Retry on reception of Initial without token */
#endif
struct proxy *frontend; /* the frontend all these listeners belong to, or NULL */
const struct mux_proto_list *mux_proto; /* the mux to use for all incoming connections (specified by the "proto" keyword) */
diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c
index 03f4178..db637e0 100644
--- a/src/cfgparse-quic.c
+++ b/src/cfgparse-quic.c
@@ -7,7 +7,7 @@
static int bind_parse_quic_force_retry(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
- conf->quic_force_retry = 1;
+ conf->options |= BC_O_QUIC_FORCE_RETRY;
return 0;
}
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index b2b1f60..444b7ac 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -5328,7 +5328,7 @@
*/
if (global.cluster_secret) {
if (!token_len) {
- if (l->bind_conf->quic_force_retry) {
+ if (l->bind_conf->options & BC_O_QUIC_FORCE_RETRY) {
TRACE_PROTO("Initial without token, sending retry", QUIC_EV_CONN_LPKT);
if (send_retry(l->rx.fd, &dgram->saddr, pkt)) {
TRACE_PROTO("Error during Retry generation", QUIC_EV_CONN_LPKT);
@@ -5393,7 +5393,7 @@
goto drop;
}
- if (global.cluster_secret && !pkt->token_len && !l->bind_conf->quic_force_retry &&
+ if (global.cluster_secret && !pkt->token_len && !(l->bind_conf->options & BC_O_QUIC_FORCE_RETRY) &&
HA_ATOMIC_LOAD(&prx_counters->conn_opening) >= global.tune.quic_retry_threshold) {
TRACE_PROTO("Initial without token, sending retry", QUIC_EV_CONN_LPKT);
if (send_retry(l->rx.fd, &dgram->saddr, pkt)) {