BUG/MEDIUM: mux-spop: Respect the negociated max-frame-size value to send frames
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Apr 2025 13:27:12 +0000 (15:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 May 2025 15:01:43 +0000 (17:01 +0200)
commit882a38d1656dfed676cac5e8519caa507b310efe
tree8956fc37d3ae1ab525314ee33ab9bba3e2f9b388
parente97c60d25e17c6ced332fd6b2218155d94dd8d15
BUG/MEDIUM: mux-spop: Respect the negociated max-frame-size value to send frames

When a SPOP connection is opened, the maximum size for frames is negociated.
This negociated size is properly used when a frame is received and if a too
big frame is detected, an error is triggered. However, the same was not
performed on the sending path. No check was performed on frames sent to the
agent. So it was possible to send frames bigger than the maximum size
supported by the the SPOE agent.

Now, the size of NOTIFY and DISCONNECT frames is checked before sending them
to the agent.

Thanks to Miroslav to have reported the issue.

This patch must be backported to 3.1.

(cherry picked from commit ce8c2d359bc338a0ac88f117bca440c93b749f15)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/mux_spop.c