Fully support draft-28 transport parameters
This CL adopts the new transport parameters from
QuicConnection and QuicSession.
Add draft-28 transport parameters, protected by draft-28 flag
PiperOrigin-RevId: 313860932
Change-Id: I1384f3457c254802fec33b24fb62cf555a772051
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 589568a..6782e06 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -952,6 +952,9 @@
void SetOriginalDestinationConnectionId(
const QuicConnectionId& original_destination_connection_id);
+ // Returns the original destination connection ID used for this connection.
+ QuicConnectionId GetOriginalDestinationConnectionId();
+
// Called when ACK alarm goes off. Sends ACKs of those packet number spaces
// which have expired ACK timeout. Only used when this connection supports
// multiple packet number spaces.
@@ -1303,6 +1306,11 @@
QuicTime::Delta GetHandshakeTimeout() const;
QuicTime GetTimeOfLastReceivedPacket() const;
+ // Validate connection IDs used during the handshake. Closes the connection
+ // on validation failure.
+ bool ValidateConfigConnectionIds(const QuicConfig& config);
+ bool ValidateConfigConnectionIdsOld(const QuicConfig& config);
+
QuicFramer framer_;
// Contents received in the current packet, especially used to identify
@@ -1619,10 +1627,15 @@
// vector to improve performance since it is expected to be very small.
std::vector<QuicConnectionId> incoming_connection_ids_;
- // When we receive a RETRY packet, we replace |server_connection_id_| with the
- // value from the RETRY packet and save off the original value of
- // |server_connection_id_| into |original_connection_id_| for validation.
- quiche::QuicheOptional<QuicConnectionId> original_connection_id_;
+ // When we receive a RETRY packet or some INITIAL packets, we replace
+ // |server_connection_id_| with the value from that packet and save off the
+ // original value of |server_connection_id_| into
+ // |original_destination_connection_id_| for validation.
+ quiche::QuicheOptional<QuicConnectionId> original_destination_connection_id_;
+
+ // After we receive a RETRY packet, |retry_source_connection_id_| contains
+ // the source connection ID from that packet.
+ quiche::QuicheOptional<QuicConnectionId> retry_source_connection_id_;
// Indicates whether received RETRY packets should be dropped.
bool drop_incoming_retry_packets_;