]> git.kaiwu.me - haproxy.git/commit
CLEANUP: quic: use QUIC_PACKET_PN_MAXLEN instead of the magic 4
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 4 Nov 2026 16:42:51 +0000 (17:42 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 5 Nov 2026 08:58:36 +0000 (09:58 +0100)
commit5ae48ca2e18468be731a516f4e97c76dcf1e10e6
tree7aae8827c387f9d1ef2910a3f7f15cc560099306
parentbda1c85bb5850fa2ca8ed428b08aeda2a0c65d31
CLEANUP: quic: use QUIC_PACKET_PN_MAXLEN instead of the magic 4

Both fast retransmission functions account for the packet number increase
when comparing the size of the packets to be retransmitted with the
anti-amplification limit. They use a plain 4 for this, while
quic_conn-t.h defines QUIC_PACKET_PN_MAXLEN for this exact purpose, as
already used in quic_tx.c for the header protection sample.

Replace the magic value in qc_prep_fast_retrans() and
qc_prep_hdshk_fast_retrans().

No functional change, no need to backport.
src/quic_retransmit.c