BUG/MINOR: quic: fix return value for error in start

Fix the return value used in quic-conn start callback for error. The
caller expects a negative value in this case.

Without this patch, the quic-conn and the connection stack are not
closed despite an initialization failure error, which is an undefined
behavior and may cause a crash in the end.
This commit is contained in:
Amaury Denoyelle 2022-04-13 17:40:26 +02:00
parent 622ec4166b
commit 05d4ae6436

View File

@ -5756,7 +5756,7 @@ static int qc_xprt_start(struct connection *conn, void *ctx)
qc = conn->handle.qc; qc = conn->handle.qc;
if (qcc_install_app_ops(qc->qcc, qc->app_ops)) { if (qcc_install_app_ops(qc->qcc, qc->app_ops)) {
TRACE_PROTO("Cannot install app layer", QUIC_EV_CONN_LPKT, qc); TRACE_PROTO("Cannot install app layer", QUIC_EV_CONN_LPKT, qc);
return 0; return -1;
} }
/* mux-quic can now be considered ready. */ /* mux-quic can now be considered ready. */