]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: quic: remove the unused count and flags from struct quic_tls_kp
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 29 Oct 2026 14:20:21 +0000 (15:20 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 3 Nov 2026 06:56:46 +0000 (07:56 +0100)
The count and flags members of struct quic_tls_kp are only initialized by
quic_tls_kp_init() and read nowhere: the key phase state is kept in the pn
member of the TLS secrets and in the flags member of the TLS context.
Let's remove them.

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

index 52f07e88fc0746a252423af4cf491c23d2686f35..48f4e98b3bac44f4d6ae1f785557d1221f56b18b 100644 (file)
@@ -204,8 +204,6 @@ struct quic_tls_kp {
        size_t ivlen;
        unsigned char *key;
        size_t keylen;
-       uint64_t count;
-       unsigned char flags;
 };
 
 /* Key phase bit of the packets we send */
index a4d223722f218384a887b605c9e69861c3573caf..61d9f532bc72ed78223872742d7a246a594a3258 100644 (file)
@@ -1170,8 +1170,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->flags = 0;
        kp->secret = pool_alloc(pool_head_quic_tls_secret);
        kp->secretlen = QUIC_TLS_SECRET_LEN;
        kp->iv = pool_alloc(pool_head_quic_tls_iv);