Fix Regression in draft-29 TP Acceptance
@@ -386,10 +386,8 @@ QuicCryptoTlsReadExtensions(
return Status;
}
- } else if (
- Connection->Stats.QuicVersion != QUIC_VERSION_DRAFT_29 &&
- (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS ||
- ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS_DRAFT)) {
+ } else if (Connection->Stats.QuicVersion != QUIC_VERSION_DRAFT_29) {
+ if (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS) {
if (!QuicCryptoTlsDecodeTransportParameters(
Connection,
FALSE,
@@ -401,6 +399,20 @@ QuicCryptoTlsReadExtensions(
FoundTransportParameters = TRUE;
}
+ } else {
+ if (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS_DRAFT) {
+ if (!QuicCryptoTlsDecodeTransportParameters(
+ Connection,
+ FALSE,
+ Buffer,
+ ExtLen,
+ &Connection->PeerTransportParams)) {
+ return QUIC_STATUS_INVALID_PARAMETER;
+ }
+ FoundTransportParameters = TRUE;
+ }
+ }
+
BufferLength -= ExtLen;
Buffer += ExtLen;
}
