From: Frederic Lecaille Date: Mon, 31 Aug 2026 15:11:14 +0000 (+0200) Subject: CLEANUP: quic: remove the unused packet number of the key phase structure X-Git-Tag: v3.5-dev6~36 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=d2a40adda9715c20f5c5e188d5fa5995dc5524e9;p=haproxy.git CLEANUP: quic: remove the unused packet number of the key phase structure struct quic_tls_kp has a member, set by quic_tls_rotate_keys() and initialized by quic_tls_kp_init(), which is not read anywhere: the previous key phase secrets are now detected with . This patch removes it. --- diff --git a/include/haproxy/quic_tls-t.h b/include/haproxy/quic_tls-t.h index 15ae8edeb..365f8f6d4 100644 --- a/include/haproxy/quic_tls-t.h +++ b/include/haproxy/quic_tls-t.h @@ -200,7 +200,6 @@ struct quic_tls_kp { unsigned char *key; size_t keylen; uint64_t count; - int64_t pn; unsigned char flags; }; diff --git a/include/haproxy/quic_tls.h b/include/haproxy/quic_tls.h index 0e053a71e..0ee2eb40e 100644 --- a/include/haproxy/quic_tls.h +++ b/include/haproxy/quic_tls.h @@ -1078,7 +1078,6 @@ static inline void quic_tls_ku_free(struct quic_conn *qc) static inline int quic_tls_kp_init(struct quic_tls_kp *kp) { kp->count = 0; - kp->pn = 0; kp->flags = 0; kp->secret = pool_alloc(pool_head_quic_tls_secret); kp->secretlen = QUIC_TLS_SECRET_LEN; diff --git a/src/quic_tls.c b/src/quic_tls.c index 04d6b6b88..0c373eefd 100644 --- a/src/quic_tls.c +++ b/src/quic_tls.c @@ -1172,7 +1172,6 @@ void quic_tls_rotate_keys(struct quic_conn *qc) qc->ku.prv_rx.secret = curr_secret; qc->ku.prv_rx.iv = curr_iv; qc->ku.prv_rx.key = curr_key; - qc->ku.prv_rx.pn = tls_ctx->rx.pn; /* Update the TX secrets */ curr_ctx = tls_ctx->tx.ctx;