]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-quic: add BUG_ON if sending on locally closed QCS
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 19 Dec 2023 10:25:18 +0000 (11:25 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Dec 2023 14:42:08 +0000 (15:42 +0100)
commit235e8f1afd7e9753a26051b30c47ecc398ccfd12
tree0acdae9dc0c3527d186ce2aca08c1efa9cc4e74c
parent0a69750a98bbf4c8d9ab2c84e3890956116dbfa0
MEDIUM: mux-quic: add BUG_ON if sending on locally closed QCS

Previously, if snd_buf operation was conducted despite QCS already
locally closed, the input buffer was silently dropped. This situation
could happen if a RESET_STREAM was emitted butemission not reported to
the stream layer. Resetting silently the buffer ensure QUIC MUX remain
compliant with RFC 9000 which forbid emission after RESET_STREAM.

Since previous commit, it is now ensured that RESET_STREAM sending will
always be reported to stream-layer. Thus, there is no need anymore to
silently reset the buffer. A BUG_ON() statement is added to ensure this
assumption will remain valid.

The new code is deemed cleaner as it does not hide a missing error
notification on the stconn-layer. Previously, if an error was missing,
sending would continue unnecessarily with a false success status
reported for the stream.

Note that the BUG_ON() statement was also added into nego_ff callback.
This is necessary to ensure both sending path remains consistent.

This patch is labelled as MEDIUM as issues were already encountered in
snd_buf/nego_ff implementation and it's not easy to cover all occurences
during test. If the BUG_ON() is triggered without any apparent
stream-layer issue, this commit should be reverted.
include/haproxy/qmux_http.h
src/mux_quic.c
src/qmux_http.c