Skip to content

Commit 3fab21e

Browse files
committed
MINOR: mux_quic: do not crash on unhandled QMux frame reception
Completes qmux_parse_frm() to ensure every frames allowed by QMux protocol are listed. For now, nothing is implemented except a CHECK_IF() to report such events. This is necessary to prevent a crash on abort. Frames not supported by QMux should already have been rejected prior via qmux_is_frm_valid().
1 parent f9d4d65 commit 3fab21e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/qcm_qmux.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,17 @@ static int qmux_parse_frm(struct qcc *qcc, struct buffer *buf)
9595
frm.type == QUIC_FT_STREAMS_BLOCKED_BIDI ||
9696
frm.type == QUIC_FT_STREAMS_BLOCKED_UNI) {
9797
/* TODO */
98+
CHECK_IF("received flow control blocked frame not yet handled in QMux");
99+
}
100+
else if (frm.type == QUIC_FT_PADDING) {
101+
CHECK_IF("received padding frame not yet handled in QMux");
102+
}
103+
else if (frm.type == QUIC_FT_CONNECTION_CLOSE ||
104+
frm.type == QUIC_FT_CONNECTION_CLOSE_APP) {
105+
CHECK_IF("received connection_close frame not yet handled in QMux");
98106
}
99107
else {
108+
/* qmux_is_frm_valid() must prevent this */
100109
ABORT_NOW();
101110
}
102111

0 commit comments

Comments
 (0)