MINOR: quic: Wrong packet number space selection

It is possible that the listener is in INITIAL state, but have to probe
with Handshake packets. In this case, when entering qc_prep_pkts() there
is nothing to do. We must select the next packet number space (or encryption
level) to be able to probe with such packet type.
This commit is contained in:
Frédéric Lécaille 2022-01-21 16:52:56 +01:00 committed by Amaury Denoyelle
parent 2cca241780
commit 39ba1c3e12

View File

@ -2574,6 +2574,14 @@ static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr,
*/
if (prv_pkt)
qc_set_dg(cbuf, dglen, first_pkt);
/* Let's select the next encryption level */
if (tel != next_tel && next_tel != QUIC_TLS_ENC_LEVEL_NONE) {
tel = next_tel;
qel = &qc->els[tel];
/* Build a new datagram */
prv_pkt = NULL;
continue;
}
break;
}