]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: qmux: remove invalid BUG_ON() on empty record
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 13 Nov 2026 09:47:56 +0000 (10:47 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 13 Nov 2026 10:02:51 +0000 (11:02 +0100)
In QMux, a BUG_ON() was present in receive path to report about a
realign needed but not implemented. This is not necessary anymore as
realign is now implemented.

Worst, BUG_ON() could be triggered when receiving an empty record. Such
records are not (yet?) prohibited by the spec. Simply remove the
BUG_ON() to avoid any issue with it.

This must be backported up to 3.4.

src/qcm_qmux.c

index 4491fb72692feab532f9f78e5e4726c09a02d11c..2a8cdb9e0e7eceaaa98e755b09e11f53fac366ab 100644 (file)
@@ -188,9 +188,6 @@ int qcc_qmux_recv(struct qcc *qcc)
                        }
                }
 
-               /* TODO realign necessary if record boundary at the extreme end of the buffer */
-               BUG_ON(!qcc->rx.rlen && b_data(buf) && b_tail(buf) == b_orig(buf));
-
                while (qcc->rx.rlen && b_data(buf) >= qcc->rx.rlen) {
                        buf_rec = b_make(b_orig(buf), b_size(buf),
                                         b_head_ofs(buf), qcc->rx.rlen);