]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: quic: remove the unused packet number of the key phase structure
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 31 Aug 2026 15:11:14 +0000 (17:11 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 31 Aug 2026 16:33:17 +0000 (18:33 +0200)
struct quic_tls_kp has a <pn> 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 <ctx>. This patch removes it.

include/haproxy/quic_tls-t.h
include/haproxy/quic_tls.h
src/quic_tls.c

index 15ae8edebfaf705c6937270444e0d74897a9dbfc..365f8f6d480b8170173c5809ebc832bb66f109ac 100644 (file)
@@ -200,7 +200,6 @@ struct quic_tls_kp {
        unsigned char *key;
        size_t keylen;
        uint64_t count;
-       int64_t pn;
        unsigned char flags;
 };
 
index 0e053a71e1e3bb72fab4e9ed3922e0a81d3944c8..0ee2eb40e8b79a26d93585a6ddff3ec8dd0c72ce 100644 (file)
@@ -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;
index 04d6b6b8823233f99b941308c5c8cd9942c982b7..0c373eefd46e0d0eb1fd36c4c7514e8d24b11c81 100644 (file)
@@ -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;