diff --git a/quiche/src/lib.rs b/quiche/src/lib.rs index bf9c27824e..6c93c1d189 100644 --- a/quiche/src/lib.rs +++ b/quiche/src/lib.rs @@ -2654,6 +2654,17 @@ impl Connection { return Ok(pkt_len); } + // A datagram with Initial+Handshake coalesced packets might be + // received after the Initial epoch has already been dropped. + // + // To avoid rejecting the Handshake packet (due to the Initial + // being undecryptable), simply skip over the Initial packet and + // continue processing the rest of the datagram. + if hdr.ty == packet::Type::Initial { + let pkt_len = b.off() + payload_len; + return Ok(pkt_len); + } + let e = drop_pkt_on_err( Error::CryptoFail, self.recv_count,