Discard just 0RTT packet, not all remaining QUIC packets
@@ -7744,10 +7744,14 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
decrypt = conn->callbacks.decrypt;
break;
case NGTCP2_PKT_0RTT:
- if (!conn->server || !conn->early.ckm) {
+ if (!conn->server) {
return NGTCP2_ERR_DISCARD_PKT;
}
+ if (!conn->early.ckm) {
+ return (ngtcp2_ssize)pktlen;
+ }
+
pktns = &conn->pktns;
aead = &conn->early.ctx.aead;
hp = &conn->early.ctx.hp;
