Ensure frame parsing error does not cause a crash by removing the
associated BUG_ON()/ABORT_NOW().
For now, connection is flagged on error, which ensures that any
send/receive future operations are prevented and connection is closed
asap. In the future, a proper CONNECTION_CLOSE will be required as
defined by QMux protocol.
No need to backport.
buf_rec = b_make(b_orig(buf), b_size(buf),
b_head_ofs(buf), qcc->rx.rlen);
frm_ret = qmux_parse_frm(qcc, &buf_rec);
-
- BUG_ON(frm_ret < 0); /* TODO handle fatal errors */
if (!frm_ret) {
- /* emit FRAME_ENCODING_ERROR */
- ABORT_NOW();
+ /* TODO implement proper connection closure */
+ conn->flags |= CO_FL_ERROR;
+ goto out;
}
/* A frame cannot be bigger than a record thanks to <buf_rec> delimitation. */