Convert return code to -1 when an error has been detected. This is
required since the previous API change on return value from the patch :
1f21ebdd7686bf435682cacd31e635db0c65b061
MINOR: mux-quic/h3: adjust demuxing function return values
Without this, QUIC MUX won't consider the call as an error and will try
to remove one byte from the buffer. This may cause a BUG_ON failure if
the buffer is empty at this stage.
This bug was introduced in the current dev tree. Does not need to be
backported.
if (!h3_is_frame_valid(h3c, qcs, ftype)) {
qcc_emit_cc_app(qcs->qcc, H3_FRAME_UNEXPECTED);
- return 1;
+ return -1;
}
if (!b_data(b))
*/
if (flen > QC_S_RX_BUF_SZ) {
qcc_emit_cc_app(qcs->qcc, H3_EXCESSIVE_LOAD);
- return 1;
+ return -1;
}
break;
}
ret = h3_parse_settings_frm(qcs->qcc->ctx, b, flen);
if (ret < 0) {
qcc_emit_cc_app(qcs->qcc, h3c->err);
- return 1;
+ return -1;
}
h3c->flags |= H3_CF_SETTINGS_RECV;
break;