mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-22 11:20:59 +01:00
BUG/MINOR: mux-quic: fix error code on shutdown for non HTTP/3
qcc_shutdown() is called whenever the connection must be closed. If
application protocol defined its owned shutdown callback, it is invoked
to use the correct error code. Else transport error code NO_ERROR is
used.
A bug occurs in the latter case as NO_ERROR is used with quic_err_app()
which is reserved for application errro codes. This will trigger the
emission of a CONNECTION_CLOSE of type 0x1d (Application) instead of
0x1c (Transport).
This bug is considered minor as it does not impact QUIC with HTTP/3. It
may only be visible when using experimental HTTP/0.9 protocol.
This should be backported up to 2.6. For 2.6, patch must be completed
rewritten due to code differences. Here is the change to apply :
diff --git a/src/mux_quic.c b/src/mux_quic.c
index 26fb70ddf..c48f82e27 100644
--- a/src/mux_quic.c
+++ b/src/mux_quic.c
@@ -1918,7 +1918,9 @@ static void qc_release(struct qcc *qcc)
qc_send(qcc);
}
else {
- qcc_emit_cc_app(qcc, QC_ERR_NO_ERROR, 0);
+ /* Duplicate from qcc_emit_cc_app() for Transport error code. */
+ if (!(qcc->conn->handle.qc->flags & QUIC_FL_CONN_IMMEDIATE_CLOSE))
+ qcc->conn->handle.qc->err = quic_err_transport(QC_ERR_NO_ERROR);
}
}
This commit is contained in:
parent
412f1eeb89
commit
4295dd21bd
@ -2352,7 +2352,7 @@ static void qcc_shutdown(struct qcc *qcc)
|
||||
qcc_io_send(qcc);
|
||||
}
|
||||
else {
|
||||
qcc->err = quic_err_app(QC_ERR_NO_ERROR);
|
||||
qcc->err = quic_err_transport(QC_ERR_NO_ERROR);
|
||||
}
|
||||
|
||||
/* Register "no error" code at transport layer. Do not use
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user