/* Wake up MUX after its creation. Operation similar to TLS+ALPN on TCP stack. */
qc->conn->mux->wake(qc->conn);
}
+ else {
+ /* Wake up upper layer if the MUX is alreay initialized.
+ * This is the case when the MUX was started for a 0-RTT session
+ * but without early-data secrets to send them (when the server
+ * does not support 0-RTT).
+ */
+ qc_notify_send(qc);
+ }
}
else {
TRACE_PROTO("could not start the mux", QUIC_EV_CONN_IO_CB, qc);
TRACE_ENTER(QUIC_EV_CONN_TXPKT, qc);
+ if (!qel) {
+ BUG_ON(!qc_is_back(qc) ||
+ !(__objt_server(qc->conn->target)->ssl_ctx.options & SRV_SSL_O_EARLY_DATA));
+ /* This may happen when 0-RTT is enabled without early-data level secrets.
+ * This always occurs when the server peer does not support 0-RTT.
+ */
+ TRACE_DEVEL("cannot send at 0-RTT level", QUIC_EV_CONN_TXPKT, qc);
+ return QUIC_TX_ERR_NONE;
+ }
+
if (qc->conn->flags & CO_FL_SOCK_WR_SH) {
qc->conn->flags |= CO_FL_ERROR | CO_FL_SOCK_RD_SH;
TRACE_DEVEL("connection on error", QUIC_EV_CONN_TXPKT, qc);
/* Schedule quic-conn to ensure post handshake frames are emitted. This
* is not done for 0-RTT as xprt->start happens before handshake
* completion.
+ * Note that, when 0-RTT is enabled for backend connections, it is
+ * possible that the ealy-data secrets could not be derived. This is the
+ * case when the server does not support 0-RTT.
*/
- if ((qc_is_back(qc) && !qc_is_conn_ready(qc)) ||
+ if ((qc_is_back(qc) && (!qc_is_conn_ready(qc) || !qc->eel)) ||
(qc->flags & QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS))
tasklet_wakeup(qc->wait_event.tasklet);