]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-quic: do not signal FIN if gap in buffer
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Jul 2022 09:26:04 +0000 (11:26 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Jul 2022 13:55:32 +0000 (15:55 +0200)
commit6befccd8a15c1bfb4d70627a1d4569c1c57f05f5
tree4ef8b03fb98b38952cd6fede6dac8d85328694c4
parente0a92a7e56b47af8586b303e33eb5ae413a51a9d
BUG/MINOR: mux-quic: do not signal FIN if gap in buffer

Adjust FIN signal on Rx path for the application layer : ensure that the
receive buffer has no gap.

Without this extra condition, FIN was signalled as soon as the STREAM
frame with FIN was received, even if we were still waiting to receive
missing offsets.

This bug could have lead to incomplete requests read from the
application protocol. However, in practice this bug has very little
chance to happen as the application layer ensures that the demuxed frame
length is equivalent to the buffer data size. The only way to happen is
if to receive the FIN STREAM as the H3 demuxer is still processing on a
frame which is not the last one of the stream.

This must be backported up to 2.6. The previous patch on ncbuf is
required for the newly defined function ncb_is_fragmented().
  MINOR: ncbuf: implement ncb_is_fragmented()
src/mux_quic.c