MINOR: h3/hq_interop: implement stream reset on shut abort/kill-conn

Adjust QUIC mux stream shut procedure when abort or kill-conn is
performed. Changes are implemented directly into lclose callback for
h3/h09 protocols.

On abort, the stream is resetted as previously. The only change is that
now a proper error code can be used, with REQUEST_CANCELLED specified
for HTTP/3 protocol.

Kill-conn is requested when a tcp-requect connection reject rule has
been executed. In this case the stream is resetted, and the connection
is also closed. This is identical to the H2 multiplexer. HTTP/3 protocol
uses EXCESSIVE_LOAD as error code in this case.
This commit is contained in:
Amaury Denoyelle 2026-04-21 14:58:53 +02:00
parent d0bd6a946b
commit 2d6ebd0410
2 changed files with 18 additions and 4 deletions

View File

@ -3114,8 +3114,16 @@ static void h3_lclose(struct qcs *qcs, enum qcc_app_ops_lclose_mode mode)
}
break;
default:
qcc_reset_stream(qcs, 0, 0);
case QCC_APP_OPS_LCLO_MODE_ABORT:
qcc_reset_stream(qcs, H3_ERR_REQUEST_CANCELLED, se_tevt_type_cancelled);
break;
case QCC_APP_OPS_LCLO_MODE_KILL_CONN:
qcc_reset_stream(qcs, H3_ERR_EXCESSIVE_LOAD, se_tevt_type_cancelled);
if (!(qcs->qcc->flags & (QC_CF_ERR_CONN|QC_CF_ERRL))) {
qcc_set_error(qcs->qcc, H3_ERR_EXCESSIVE_LOAD, 1,
muxc_tevt_type_graceful_shut);
}
break;
}

View File

@ -331,8 +331,14 @@ static void hq_interop_lclose(struct qcs *qcs, enum qcc_app_ops_lclose_mode mode
qcc_send_stream(qcs, 0, 0);
break;
default:
qcc_reset_stream(qcs, 0, 0);
case QCC_APP_OPS_LCLO_MODE_ABORT:
qcc_reset_stream(qcs, 0, se_tevt_type_cancelled);
break;
case QCC_APP_OPS_LCLO_MODE_KILL_CONN:
qcc_reset_stream(qcs, 0, se_tevt_type_cancelled);
if (!(qcs->qcc->flags & (QC_CF_ERR_CONN|QC_CF_ERRL)))
qcc_set_error(qcs->qcc, 0, 0, muxc_tevt_type_graceful_shut);
break;
}
}