From: Willy Tarreau Date: Wed, 11 Feb 2026 13:46:55 +0000 (+0100) Subject: DOC: proxy-proto: underline the packed attribute for struct pp2_tlv_ssl X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c622ed23c8e7f93e37bd993e86837aa758b8cabc;p=thirdparty%2Fhaproxy.git DOC: proxy-proto: underline the packed attribute for struct pp2_tlv_ssl Oto Valek rightfully reported in issue #3262 that the proxy-protocol doc makes no mention of the packed attribute on struct pp2_tlv_ssl, which is mandatory since fields are not type-aligned in it. Let's add it in the definition and make an explicit mention about it to save implementers from wasting their time trying to debug this. It can be backported. --- diff --git a/doc/proxy-protocol.txt b/doc/proxy-protocol.txt index 2c5cfae96..18d7031d5 100644 --- a/doc/proxy-protocol.txt +++ b/doc/proxy-protocol.txt @@ -627,7 +627,10 @@ For the type PP2_TYPE_SSL, the value is itself a defined like this : uint8_t client; uint32_t verify; struct pp2_tlv sub_tlv[0]; - }; + } __attribute__((packed)); + +Note the "packed" attribute which indicates that each field starts immediately +after the previous one (i.e. without type-specific alignment nor padding). The field will be zero if the client presented a certificate and it was successfully verified, and non-zero otherwise.