mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: quic: emit CONNECTION_CLOSE on app init error
Emit a CONNECTION_CLOSE if the app layer cannot be properly initialized on qc_xprt_start. This force the quic-conn to enter the closing state before being closed. Without this, quic-conn normal operations continue, despite the app-layer reported as not initialized. This behavior is undefined, in particular when handling STREAM frames.
This commit is contained in:
parent
05d4ae6436
commit
5d774dee55
@ -5756,6 +5756,9 @@ static int qc_xprt_start(struct connection *conn, void *ctx)
|
||||
qc = conn->handle.qc;
|
||||
if (qcc_install_app_ops(qc->qcc, qc->app_ops)) {
|
||||
TRACE_PROTO("Cannot install app layer", QUIC_EV_CONN_LPKT, qc);
|
||||
/* prepare a CONNECTION_CLOSE frame */
|
||||
qc->err_code = QC_ERR_APPLICATION_ERROR;
|
||||
qc->flags |= QUIC_FL_CONN_IMMEDIATE_CLOSE;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user