MINOR: quic: restore QUIC_HP_SAMPLE_LEN constant
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 8 Sep 2025 12:42:26 +0000 (14:42 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 17 Oct 2025 08:21:58 +0000 (10:21 +0200)
commitc3045d2744730f46270817686238b368eec6469c
treebb5db692cddf90af17967600ecced84564922a1e
parenta864596a283d8c463f06409a5e3f0071aeb8348c
MINOR: quic: restore QUIC_HP_SAMPLE_LEN constant

The below patch fixes padding emission for small packets, which is
required to ensure that header protection removal can be performed by
the recipient.

  commit d7dea408c64c327cab6aebf4ccad93405b675565
  BUG/MINOR: quic: too short PADDING frame for too short packets

In addition to the proper fix, constant QUIC_HP_SAMPLE_LEN was removed
and replaced by QUIC_TLS_TAG_LEN. However, it still makes sense to have
a dedicated constant which represent the size of the sample used for
header protection. Thus, this patch restores it.

Special instructions for backport : above patch mentions that no
backport is needed. However, this is incorrect, as bug is introduced by
another patch scheduled for backport up to 2.6. Thus, it is first
mandatory to schedule d7dea408c64c327cab6aebf4ccad93405b675565 after it.
Then, this patch can also be used for the sake of code clarity.

(cherry picked from commit f645cd3c74ed07f351f9ce9cebc609a3a7d8407a)
[ad: fix conflict due to missing trace in 3.2]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit dac51e76f694b6180fdf0be1304b760d740c2f59)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit cb432641f99d6011cd85faa5ef57bf1fe6f2f87e)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
include/haproxy/quic_conn-t.h
src/quic_tx.c