]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: add BUG_ON on control receive function
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 6 Dec 2021 13:26:52 +0000 (14:26 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 7 Dec 2021 14:37:53 +0000 (15:37 +0100)
Add BUG_ON statement when handling a non implemented frames on the
control stream. This is required because frames must be removed from the
RX buffer or else it will stall the buffer.

src/h3.c

index 9be2a5b11c18f16b12a14c5ea26c717fb0eb0783..14c56c697e20be3586a374c3ca40eae10e01e46f 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -299,14 +299,20 @@ static int h3_control_recv(struct h3_uqs *h3_uqs, void *ctx)
                /* From here, a frame must not be truncated */
                switch (ftype) {
                case H3_FT_CANCEL_PUSH:
+                       /* XXX TODO XXX */
+                       ABORT_NOW();
                        break;
                case H3_FT_SETTINGS:
                        if (!h3_parse_settings_frm(h3, rxbuf, flen))
                                return 0;
                        break;
                case H3_FT_GOAWAY:
+                       /* XXX TODO XXX */
+                       ABORT_NOW();
                        break;
                case H3_FT_MAX_PUSH_ID:
+                       /* XXX TODO XXX */
+                       ABORT_NOW();
                        break;
                default:
                        /* Error */