BUG/MINOR: spoe: Properly detect and skip empty NOTIFY frames
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Aug 2025 13:38:42 +0000 (15:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Aug 2025 06:54:13 +0000 (08:54 +0200)
commit720582fb7332f1a2846b63ede1dd56ad8394699e
treec951388e66275de5d35e93c93c95ed6e79acf9f2
parent2b0da3f5da9b12771d1f32e465b5b1f6788bb41c
BUG/MINOR: spoe: Properly detect and skip empty NOTIFY frames

Since the SPOE was refactored, the detection of empty NOTIFY frames is
broken. So it is possible to send a NOTIFY frames to an agent with no
message at all. The bug happens because the frame type is now added to the
buffer before the messages encoding. So the buffer is never really empty.

To fix the issue, the condition to detect empty frame was adapted.

This patch must be backported as far as 3.1.

(cherry picked from commit dc6e8dde231990d6f999c64117a301fc66a7256c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 2b645d072e998565d61c76a98c1e3103cb28f7d2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/flt_spoe.c