Don't allow 0-RTT packets to initialize a connection
@@ -1470,7 +1470,6 @@ QuicBindingDeliverDatagrams(
CXPLAT_DBG_ASSERT(QuicIsVersionSupported(Packet->Invariant->LONG_HDR.Version));
- BOOLEAN IsInitial = FALSE;
//
// Only Initial (version specific) packets are processed from here on.
//
@@ -1478,8 +1477,7 @@ QuicBindingDeliverDatagrams(
case QUIC_VERSION_1:
case QUIC_VERSION_DRAFT_29:
case QUIC_VERSION_MS_1:
- IsInitial = Packet->LH->Type == QUIC_INITIAL;
- if (!IsInitial && Packet->LH->Type != QUIC_0_RTT_PROTECTED) {
+ if (Packet->LH->Type != QUIC_INITIAL) {
QuicPacketLogDrop(Binding, Packet, "Non-initial packet not matched with a connection");
return FALSE;
}
@@ -1508,14 +1506,10 @@ QuicBindingDeliverDatagrams(
BOOLEAN DropPacket = FALSE;
if (QuicBindingShouldRetryConnection(
Binding, Packet, TokenLength, Token, &DropPacket)) {
- if (IsInitial) {
return
QuicBindingQueueStatelessOperation(
Binding, QUIC_OPER_TYPE_RETRY, DatagramChain);
}
- QuicPacketLogDrop(Binding, Packet, "Non-initial packet during retry.");
- return FALSE;
- }
if (!DropPacket) {
Connection = QuicBindingCreateConnection(Binding, DatagramChain);
