]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-spop: Remove frame parsing states from the SPOP connection state
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 16:55:32 +0000 (18:55 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 May 2025 17:51:40 +0000 (19:51 +0200)
commita3940614c24049d2c1ee9f686e0579e3a2e49b33
treee86a87b7943d4a1bbeff4a8191dbe37b889016b3
parent6b0f7de4e34c7da1ec7ae82e8e8a298823e50d72
BUG/MEDIUM: mux-spop: Remove frame parsing states from the SPOP connection state

SPOP_CS_FRAME_H and SPOP_CS_FRAME_P states, that were used to handle frame
parsing, were removed. The demux process now relies on the demux stream ID
to know if it is waiting for the frame header or the frame
payload. Concretly, when the demux stream ID is not set (dsi == -1), the
demuxer is waiting for the next frame header. Otherwise (dsi >= 0), it is
waiting for the frame payload. It is especially important to be able to
properly handle DISCONNECT frames sent by the agents.

SPOP_CS_RUNNING state is introduced to know the hello handshake was finished
and the SPOP connection is able to open SPOP streams and exchange NOTIFY/ACK
frames with the agents.

It depends on the following fixes:

  * MINOR: mux-spop: Don't set SPOP connection state to FRAME_H after ACK parsing
  * BUG/MINOR: mux-spop: Make the demux stream ID a signed integer

This change will be mandatory for the next fix. It must be backported to 3.1
with the commits above.
include/haproxy/mux_spop-t.h
src/mux_spop.c